Skip to content

Dim Extra

ui.dim enables Snacks dim, which keeps the active scope visually prominent by dimming the surrounding lines.

Enable it

-- ~/.config/blak/lua/blak/user.lua
return {
extras = {
enabled = {
"ui.dim",
},
},
}

Or enable it interactively:

:BlakExtras enable ui.dim

What it adds

SurfaceContribution
Snacksdim.enabled = true

Snacks already ships with Blak for dashboard/input/notifier/picker support, so this extra does not add a plugin spec. Enabling it through :BlakExtras applies it to the current session; if you edit user.lua, reload the config or restart Blak.

Configure dimming

Snacks dim options go under snacks.dim:

return {
extras = {
enabled = { "ui.dim" },
},
snacks = {
dim = {
scope = {
min_size = 5,
max_size = 20,
siblings = true,
},
animate = {
enabled = true,
easing = "outQuad",
duration = { step = 20, total = 300 },
},
},
},
}

Disable dimming temporarily

To keep the extra enabled but disable dimming without editing your enabled extras list:

vim.g.snacks_dim = false -- global
vim.b.snacks_dim = false -- current buffer

You can also call Snacks directly:

:lua require("snacks").dim.disable()
:lua require("snacks").dim.enable()

To disable it permanently, remove "ui.dim" from extras.enabled or run :BlakExtras disable ui.dim, then restart Blak.