-
How do I disable some functionalities for some certain file types? For example, I want to disable indent for markdown files but have it enabled for others. |
Beta Was this translation helpful? Give feedback.
Answered by
knmac
Jan 9, 2025
Replies: 1 comment 1 reply
-
Snacks has a filtering option that you can set to false, Or you can just filter option. opts = {
indent = {
filter = function(buf)
return not vim.tbl_contains({ "markdown" }, vim.b[buf].filetype)
end
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reasons, the suggested code doesn't work for me, but the method using
autocmd
andvim.b.snacks_indent
work. Here's my working config: