mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
feat(ui): fancy fold text
This commit is contained in:
parent
364bcf325d
commit
f1ce07510d
3 changed files with 24 additions and 1 deletions
|
@ -21,6 +21,15 @@ function M.icon(sign, len)
|
|||
return sign.texthl and ("%#" .. sign.texthl .. "#" .. text .. "%*") or text
|
||||
end
|
||||
|
||||
function M.foldtext()
|
||||
local ret = vim.treesitter.foldtext and vim.treesitter.foldtext()
|
||||
if not ret then
|
||||
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 })
|
||||
return ret
|
||||
end
|
||||
|
||||
function M.statuscolumn()
|
||||
local win = vim.g.statusline_winid
|
||||
if vim.wo[win].signcolumn == "no" then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue