-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Indent could not be customized #389
Comments
You're using wrong syntax. It should be opts = {
indent = {
indent = { -- whatever you want },
scope = { -- whatever you want },
},
} |
Hey @dpetka2001, thanks a lot, it works! |
BTW, is it possible to exclude some files (for example markdown) from indenting ? |
See the config docs. Right at the bottom there'a a |
Hi @dpetka2001, you’re amazing! Thanks so much for your help! The snacks indent is finally working perfectly here! 😉 indent = {
indent = {
enabled = true,
char = "▏",
},
scope = {
enabled = true,
underline = true,
char = "▏",
},
filter = function(buf)
local b = vim.b[buf]
local bo = vim.bo[buf]
local excluded_filetypes = {
markdown = true,
text = true,
}
return vim.g.snacks_indent ~= false
and b.snacks_indent ~= false
and bo.buftype == ""
and not excluded_filetypes[bo.filetype]
end,
}, |
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10.3
Operating system/version
MacOS Sequoia Versionar 15.2
Describe the bug
Hello folke,
I've noticed that it's not possible to customize Snack.indent at the moment, for instance, if the
char
option ofindent
(scope
,chunk
, or other) is changed in the custom user files, this change doesn't have any effects.This issue does not only affect the
char
option, but also other options.In the next screenshot the
char
options is changed to another character, then the config is reloaded, and another nvim session is open one more time, but the change is not visible:So, I've checked the
snacks
code insnacks.nvim/lua/snacks/indent.lua
that (for example) for indent, the code just test theenable
option, and then the default configuration is loaded.I think, this is a minor issue, But I still tried to communicate it.
Thank for your time
Steps To Reproduce
Expected Behavior
~/.local/share/nvim/lazy/snacks.nvim/lua/snacks/indent.lua
with success:Repro
The text was updated successfully, but these errors were encountered: