Skip to content

Mini.nvim Modules Extra

editor.mini installs and sets up the Mini modules you list in mini.modules. It uses the standalone nvim-mini/mini.<module> repositories instead of pulling in the whole collection, and it does not enable any module by default.

-- ~/.config/blak/lua/blak/user.lua
return {
extras = {
enabled = {
"editor.mini",
},
},
mini = {
modules = {
"ai",
"surround",
"splitjoin",
},
opts = {
surround = { n_lines = 80 },
},
},
}

Because this extra adds plugins, run:

:BlakExtras sync
Surface Contribution
Plugin nvim-mini/mini.<module> for every configured module except core or conflicting modules
Config require("mini.<module>").setup(opts)

mini.icons and pair handling already ship in Blak core. Keep icons and pairs out of mini.modules unless you are intentionally replacing core setup in your own fork.

Use module slugs without the mini. prefix:

return {
extras = { enabled = { "editor.mini" } },
mini = {
modules = { "ai", "move", "surround", "trailspace" },
},
}

mini.ai also works if you prefer the full module name.

Common choices:

Module Adds
ai richer a/i textobjects
surround add, delete, replace, and find surrounds
splitjoin split and join arguments
trailspace highlight and remove trailing whitespace
hipatterns highlight configured text patterns

The upstream module list lives in the mini.nvim documentation.

Options go under mini.opts.<module> and are passed directly to that module’s setup() call:

return {
extras = { enabled = { "editor.mini" } },
mini = {
modules = { "surround", "splitjoin" },
opts = {
surround = {
n_lines = 120,
},
splitjoin = {
mappings = {
toggle = "gS",
},
},
},
},
}

Many Mini modules create their own mappings or commands during setup(). Blak keeps the selection explicit in user.lua so enabling this extra does not silently change editing behavior.

Remove "editor.mini" from extras.enabled or run:

:BlakExtras disable editor.mini
:BlakExtras sync

Restart Blak when you want already-loaded Mini modules, mappings, and runtime hooks to disappear from the current session.