Closed shalawfatah closed 3 months ago
You need to set a custom 'statuscolumn' value. https://github.com/luukvbaal/statuscol.nvim is a great implementation of that, which has a custom function that doesn't show the fold numbers.
Here's my config (using lazy.nvim):
{
'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,
},
Thanks @nogweii this is actually the first solution I see work flawlessly, now my Neovim set up is complete. Thanks again.
Feature description
This plugin is such a good addition to have except I want to be able to hide the fold level numbers, as I see them as unnecessary and often contrary to what a clean code editor UI should look. I tried to hide them on my own but the problem is I don't have such knowledge and it seems not easy to do.
Describe the solution you'd like
A feature like
toggle_fold_level_numbers = true/false
could be a great addition. When you set it to false, the fold level numbers should no longer be there.Additional context
There were many ways to go around it, but one was hiding the folding ticks
>
, which is not what I want, one was making the ticks get nested on different columns, which is not pleasant and counter-productive. The last one required to re-build neovim, which I did not know how to do it.