Skip to content

Xuyuanp/scrollbar.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrollbar.nvim

Github Action License GitHub Contributors

scrollbar for neovim

Installation

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.

Options

See in doc :h Scrollbar.nvim.

Similar Projects