Takes control over statuscolumn
to indicate fold depth at a glance.
Indirectly inspired by Xcode fold indicator.
lazy.nvim
:
{
'EtiamNullam/fold-ribbon.nvim',
config = function()
require('fold-ribbon').setup()
end,
},
vim-plug
:
Plug 'EtiamNullam/fold-ribbon'
Useful when you do not have the statuscolumn
configured or need a simple solution.
require('fold-ribbon').setup()
Choose this if you are already have a custom statuscolumn
and you want to add fold-ribbon
to it.
local ribbon = require('fold-ribbon').get_ribbon()
vim.o.statuscolumn = '%l ' .. ribbon
You can define your own colors at each fold level. If there are more fold levels than amount of defined steps they will loop. highlight_steps
has to be a table of highlights just as you would use in vim.api.nvim_set_hl
.
require('fold-ribbon').setup {
highlight_steps = {
{ bg = '#ff8888' },
{ bg = '#88ff88' },
{ bg = '#8888ff' },
}
}
You can toggle plugin by passing disable = true
as option to setup
.
require('fold-ribbon').setup {
disable = true,
}