Xinqi Bao's Git

feat(nvim): retain boundaries of Tree-sitter folds
authorXinqi Bao <[email protected]>
Mon, 5 Oct 2026 12:45:10 +0000 (20:45 +0800)
committerXinqi Bao <[email protected]>
Mon, 5 Oct 2026 12:45:10 +0000 (20:45 +0800)
commit1617970b6d578d49fd6fa212edba780f59af46fd
treeb34bbc31f4055a01501678356c3853d1c1967d89
parent1351bd7d4ef69b38593e9967de7f6a12c6cc01f1
feat(nvim): retain boundaries of Tree-sitter folds

Trim native folds by one line at both ends, preserving visible code and its syntax highlighting. Keep short interiors visible through the default foldminlines setting.

Use a zero fold expression until a parser starts successfully, including after changing to an unsupported filetype.
.config/nvim/init.vim
.config/nvim/lua/plugin-config/nvim-treesitter.lua