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:
Santos Gallegos 2020-09-04 23:15:37 -05:00
parent fa5aa080dc
commit 9bb3b05481

View file

@ -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