I'm using NeoVIM, and I set up it to show folds automatically. The trouble is that when there is more than one level of folds, it's going to show numbers at the left.
Is there any way to remove them, just look like any other modern editors?
I searched on google, StackOverflow, and checked the vimhelp page. I haven't seen a way for this.
I'm sure that's the default behavior, I can reproduce it on the default vim of codesandbox and without any plugin. Please check this link https://codesandbox.io/s/wizardly-tereshkova-vwh5im?file=/README.md. Here is the screenshot.
If someone still looks for an asnwer, this configuration in luukvbaal/statuscol.nvim
solves the issue. I tested it myself.
{
'luukvbaal/statuscol.nvim',
opts = function()
local builtin = require('statuscol.builtin')
return {
setopt = true,
-- override the default list of segments with:
-- number-less fold indicator, then signs, then line number & separator
segments = {
{ text = { builtin.foldfunc }, click = 'v:lua.ScFa' },
{ text = { '%s' }, click = 'v:lua.ScSa' },
{
text = { builtin.lnumfunc, ' ' },
condition = { true, builtin.not_empty },
click = 'v:lua.ScLa',
},
},
}
end,
}
As explained in :help fold-foldcolumn
, when the value of :help 'foldcolumn
is large enough, the fold level is indicated by vertical bars but, when there is not enough room, numbers are used instead. That behavior is not governed by any option so there is nothing you can do about it except rolling up your sleeves and modifying the source code.
That said, the ˇ
s in your screenshot are clearly not standard `:help 'fillchars', as hinted in the comments, so you should probably take a look at what is redefining those before taking any action.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With