Skip to content

Xuyuanp/scrollbar.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3f0d417 · Jan 22, 2025

History

32 Commits
Sep 19, 2020
Jan 22, 2025
Jan 22, 2025
Sep 19, 2020
Sep 19, 2020
Sep 17, 2020
Jan 22, 2025
Aug 18, 2024

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