mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-03-21 03:46:37 +00:00
Merge pull request #1461 from horriblename/fold
treesitter: remove foldByDefault
This commit is contained in:
commit
234d053e8f
4 changed files with 9 additions and 3 deletions
|
|
@ -29,6 +29,10 @@
|
||||||
is unlikely to cause any noticeable change in behavior or breakage, it's
|
is unlikely to cause any noticeable change in behavior or breakage, it's
|
||||||
mentioned just in case.
|
mentioned just in case.
|
||||||
|
|
||||||
|
- `vim.treesitter.foldByDefault` is removed. Folding behavior should be
|
||||||
|
controlled via `vim.options.foldenable` directly instead. RIP
|
||||||
|
`vim.treesitter.foldByDefault` 2026-03-19 - 2026-03-19.
|
||||||
|
|
||||||
[Snoweuph](https://github.com/snoweuph)
|
[Snoweuph](https://github.com/snoweuph)
|
||||||
|
|
||||||
- "Correct `languages.go.treesitter` to contain all Go file types.
|
- "Correct `languages.go.treesitter` to contain all Go file types.
|
||||||
|
|
|
||||||
|
|
@ -342,5 +342,10 @@ in {
|
||||||
Incremental selection configuration has been removed from nvim-treesitter.
|
Incremental selection configuration has been removed from nvim-treesitter.
|
||||||
'')
|
'')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# 2026-03-19
|
||||||
|
[
|
||||||
|
(mkRenamedOptionModule ["vim" "treesitter" "foldByDefault"] ["vim" "options" "foldenable"])
|
||||||
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.lists) optionals;
|
inherit (lib.lists) optionals;
|
||||||
inherit (lib.nvim.dag) entryAfter;
|
inherit (lib.nvim.dag) entryAfter;
|
||||||
inherit (lib.trivial) boolToString;
|
|
||||||
|
|
||||||
cfg = config.vim.treesitter;
|
cfg = config.vim.treesitter;
|
||||||
in {
|
in {
|
||||||
|
|
@ -55,7 +54,6 @@ in {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.wo[0][0].foldmethod = "expr"
|
vim.wo[0][0].foldmethod = "expr"
|
||||||
vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||||
vim.o.foldenable = ${boolToString cfg.foldByDefault}
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
''}
|
''}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ in {
|
||||||
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
||||||
|
|
||||||
fold = mkEnableOption "fold with treesitter";
|
fold = mkEnableOption "fold with treesitter";
|
||||||
foldByDefault = mkEnableOption "folding by default when a file is opened";
|
|
||||||
autotagHtml = mkEnableOption "autoclose and rename html tag";
|
autotagHtml = mkEnableOption "autoclose and rename html tag";
|
||||||
|
|
||||||
grammars = mkOption {
|
grammars = mkOption {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue