File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
modules/plugins/treesitter Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 2121
2222 treesitter . grammars = optionals cfg . addDefaultGrammars cfg . defaultGrammars ;
2323
24- pluginRC . treesitter-autocommands = entryAfter [ "basic" ] ''
25- vim.api.nvim_create_augroup("nvf_treesitter", { clear = true })
24+ # Define the autogroup for treesitter here rather than in the Lua snippet
25+ # to allow overriding more easily. Should be highly unlikely that a user
26+ # wants to override, but not impossible.
27+ augroups = [
28+ {
29+ enable = true ;
30+ name = "nvf_treesitter" ;
31+ clear = true ;
32+ }
33+ ] ;
2634
35+ pluginRC . treesitter-autocommands = entryAfter [ "basic" ] ''
2736 ${ lib . optionalString cfg . highlight . enable ''
2837 -- Enable treesitter highlighting for all filetypes
2938 vim.api.nvim_create_autocmd("FileType", {
5463 callback = function()
5564 vim.wo[0][0].foldmethod = "expr"
5665 vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
66+
5767 -- This is optional, but is set rather as a sane default.
5868 -- If unset, opened files will be folded by automatically as
5969 -- the files are opened
You can’t perform that action at this time.
0 commit comments