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.

Enable it

-- ~/.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

What it adds

SurfaceContribution
Pluginnvim-mini/mini.<module> for every configured module except core or conflicting modules
Configrequire("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.

Choose modules

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:

ModuleAdds
airicher a/i textobjects
surroundadd, delete, replace, and find surrounds
splitjoinsplit and join arguments
trailspacehighlight and remove trailing whitespace
hipatternshighlight configured text patterns

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

Configure a module

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.

Disable it

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.