feat(nvim): improve nvim-ufo folded display

This commit is contained in:
Price Hiller 2023-09-24 10:29:41 -05:00
parent 2b721ac85b
commit 84ae1a0778
No known key found for this signature in database

View File

@ -12,7 +12,7 @@ return {
-- Show numbers for fold text
local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local suffix = (" 󰁂 %d "):format(endLnum - lnum)
local suffix = (" {...} 󰁂 %d "):format(endLnum - lnum)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
@ -38,13 +38,12 @@ return {
return newVirtText
end
local ft_options = { norg = "" }
local ft_options = { norg = "", octo = "" }
return {
provider_selector = function(_, filetype, _)
return ft_options[filetype] or { "treesitter", "indent" }
end,
fold_virt_text_handler = handler,
disabled = { "norg" },
}
end,
},