diff options
| author | Andrew He <he.andrew.mail@gmail.com> | 2021-07-13 01:21:38 -0700 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-07-18 16:57:57 +0000 |
| commit | 50af926d81231a24c0a5bc0be383e2574b0be78a (patch) | |
| tree | 61a5e785b84351c7c1b11edec21d3566d883014b /lua | |
| parent | c: don't treat uppercase functions as constants (diff) | |
| download | nvim-treesitter-50af926d81231a24c0a5bc0be383e2574b0be78a.tar nvim-treesitter-50af926d81231a24c0a5bc0be383e2574b0be78a.tar.gz nvim-treesitter-50af926d81231a24c0a5bc0be383e2574b0be78a.tar.bz2 nvim-treesitter-50af926d81231a24c0a5bc0be383e2574b0be78a.tar.lz nvim-treesitter-50af926d81231a24c0a5bc0be383e2574b0be78a.tar.xz nvim-treesitter-50af926d81231a24c0a5bc0be383e2574b0be78a.tar.zst nvim-treesitter-50af926d81231a24c0a5bc0be383e2574b0be78a.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) |
