lewis6991 / satellite.nvim

Decorate scrollbar for Neovim
MIT License
542 stars 20 forks source link

`:SatelliteToggle` #34

Open luiz00martins opened 1 year ago

luiz00martins commented 1 year ago

Describe the solution you'd like Exactly what is sounds like.

If satellite.nvim is enabled, it executes :SatelliteDisable. If satellite.nvim is disabled, it executes :SatelliteEnable.

Describe alternatives you've considered

local scrollbar_enabled = true
function toggle_scrollbar()
    if scrollbar_enabled then
        vim.cmd(':SatelliteDisable')
    else
        vim.cmd(':SatelliteEnable')
    end

    scrollbar_enabled = not scrollbar_enabled
end
map('n', ' os', toggle_scrollbar)

Not exactly hard to implement yourself, but I think it makes sense inside the plugin.