mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
Fold: don't fold the first line from the node
Currently the fold will hide the function name, this makes it hard to have context over the fold. Leaving the first line visible makes it easy to read.
This commit is contained in:
parent
fa5aa080dc
commit
9bb3b05481
1 changed files with 2 additions and 0 deletions
|
|
@ -23,6 +23,8 @@ local folds_levels = utils.memoize_by_buf_tick(function(bufnr)
|
|||
|
||||
for _, node in ipairs(matches) do
|
||||
local start, _, stop, stop_col = node.node:range()
|
||||
-- Don't hide the first line
|
||||
start = start + 1
|
||||
|
||||
if stop_col > 0 then
|
||||
stop = stop + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue