scrollbar for neovim
Just use your favorite plugin manager. e.g. lazy.nvim:
{
'Xuyuanp/scrollbar.nvim',
-- no setup required
init = function()
local group_id = vim.api.nvim_create_augroup('scrollbar_init', { clear = true })
vim.api.nvim_create_autocmd({ 'BufEnter', 'WinScrolled', 'WinResized' }, {
group = group_id,
desc = 'Show or refresh scrollbar',
pattern = { '*' },
callback = function()
require('scrollbar').show()
end,
})
end,
},
This plugin provides only two functions, show
and clear
. Just call them as you need.
NOTE: clear
is NOT disable
. To disable it, call clear
, then remove all the autocommands.
See in doc :h Scrollbar.nvim
.
- minimap.vim by @wfxr