mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 17:28:57 +02:00
fix(ui): fixed foldtext on Neovim < 0.10
This commit is contained in:
parent
b1ad48067e
commit
1b74d67a0d
1 changed files with 9 additions and 0 deletions
|
@ -28,6 +28,15 @@ function M.foldtext()
|
|||
ret = { { vim.api.nvim_buf_get_lines(0, vim.v.lnum - 1, vim.v.lnum, false)[1], {} } }
|
||||
end
|
||||
table.insert(ret, { " " .. require("lazyvim.config").icons.misc.dots })
|
||||
|
||||
if not vim.treesitter.foldtext then
|
||||
return table.concat(
|
||||
vim.tbl_map(function(line)
|
||||
return line[1]
|
||||
end, ret),
|
||||
" "
|
||||
)
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue