feat(indent): move animate settings top-level, since they impact both scope and chunk

This commit is contained in:
Folke Lemaitre 2024-12-12 09:17:54 +01:00
parent 851dc7854b
commit baf8c180d9
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -31,20 +31,20 @@ local defaults = {
-- "SnacksIndent8",
-- },
},
-- animate scopes. Enabled by default for Neovim >= 0.10
-- Works on older versions but has to trigger redraws during animation.
---@type snacks.animate.Config|{enabled?: boolean}
animate = {
enabled = vim.fn.has("nvim-0.10") == 1,
easing = "linear",
duration = {
step = 20, -- ms per step
total = 500, -- maximum duration
},
},
---@class snacks.indent.Scope.Config: snacks.scope.Config
scope = {
enabled = true, -- enable highlighting the current scope
-- animate scopes. Enabled by default for Neovim >= 0.10
-- Works on older versions but has to trigger redraws during animation.
---@type snacks.animate.Config|{enabled?: boolean}
animate = {
enabled = vim.fn.has("nvim-0.10") == 1,
easing = "linear",
duration = {
step = 20, -- ms per step
total = 500, -- maximum duration
},
},
char = "",
underline = false, -- underline the start of the scope
only_current = false, -- only show scope in the current window