Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions modules/plugins/treesitter/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ in {
callback = function()
vim.wo[0][0].foldmethod = "expr"
vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
-- This is optional, but is set rather as a sane default.
-- If unset, opened files will be folded by automatically as
-- the files are opened
vim.o.foldenable = false
vim.o.foldenable = ${if cfg.foldEnable then "true" else "false"}
end,
})
''}
Expand Down
1 change: 1 addition & 0 deletions modules/plugins/treesitter/treesitter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ in {
enable = mkEnableOption "treesitter, also enabled automatically through language options";

fold = mkEnableOption "fold with treesitter";
foldEnable = mkEnableOption "folds when treesitter folding is configured";
autotagHtml = mkEnableOption "autoclose and rename html tag";

grammars = mkOption {
Expand Down