feat(nvim): improve nvim-ufo folded display
This commit is contained in:
parent
2b721ac85b
commit
84ae1a0778
@ -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,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user