diff options
| author | Andrew He <he.andrew.mail@gmail.com> | 2021-07-13 01:21:38 -0700 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-09-17 21:06:36 +0200 |
| commit | c8b32028bcb1f989d256ad649f21e7764cd1cfef (patch) | |
| tree | 61a5e785b84351c7c1b11edec21d3566d883014b /lua | |
| parent | c: don't treat uppercase functions as constants (diff) | |
| download | nvim-treesitter-c8b32028bcb1f989d256ad649f21e7764cd1cfef.tar nvim-treesitter-c8b32028bcb1f989d256ad649f21e7764cd1cfef.tar.gz nvim-treesitter-c8b32028bcb1f989d256ad649f21e7764cd1cfef.tar.bz2 nvim-treesitter-c8b32028bcb1f989d256ad649f21e7764cd1cfef.tar.lz nvim-treesitter-c8b32028bcb1f989d256ad649f21e7764cd1cfef.tar.xz nvim-treesitter-c8b32028bcb1f989d256ad649f21e7764cd1cfef.tar.zst nvim-treesitter-c8b32028bcb1f989d256ad649f21e7764cd1cfef.zip | |
Folds: remove ending marks for folds; they only confuse vim when multiple closes on the same line are expected
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/fold.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/fold.lua b/lua/nvim-treesitter/fold.lua index 2502f717d..38e03dbe8 100644 --- a/lua/nvim-treesitter/fold.lua +++ b/lua/nvim-treesitter/fold.lua @@ -84,7 +84,11 @@ local folds_levels = tsutils.memoize_by_buf_tick(function(bufnr) if trimmed_level - last_trimmed_level > 0 then prefix = ">" elseif trimmed_level - next_trimmed_level > 0 then - prefix = "<" + -- Ending marks tend to confuse vim more than it helps, particularly when + -- the fold level changes by at least 2; we can uncomment this if + -- vim's behavior gets fixed. + -- prefix = "<" + prefix = "" end levels[lnum + 1] = prefix .. tostring(trimmed_level) |
