fold options/hotkeys

This commit is contained in:
2026-08-05 06:39:52 +02:00
parent 4b066534d4
commit d584ef391a
2 changed files with 18 additions and 0 deletions
+8
View File
@@ -12,6 +12,14 @@ o.winborder = "single"
o.termguicolors = true
o.autoread = true
-- Folding: native treesitter folds (function/class/block-aware), no plugin needed.
-- `foldmethod=diff` (used automatically in :diffthis / fugitive / diffview windows)
-- takes over on its own and isn't affected by this.
o.foldmethod = "expr"
o.foldexpr = "v:lua.vim.treesitter.foldexpr()"
o.foldlevel = 99 -- start with everything open
o.foldlevelstart = 99
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold", "CursorHoldI" }, {
command = "if mode() != 'c' | checktime | endif",
})