satellite.nvim
satellite.nvim copied to clipboard
Decorate scrollbar for Neovim
🚧 WIP and EXPERIMENTAL 🚧
satellite.nvim
satellite.nvim
is a Neovim plugin that displays decorated scrollbars.
NOTE: Many API's required to implement a decorated scrollbar in Neovim do not yet exist, and because of this, this plugin implements fairly unideal and unoptimised workarounds to get desired behaviours. Therefore, this plugin is highly experimental and currently serves as a platform to experiment, investigate and design the required API's that are needed to be implemented in Neovim core.
Features
- Display marks for different kinds of decorations across the buffer. Builtin handlers include:
- Search results
- Diagnostic
- Git hunks (via gitsigns.nvim)
- Marks
- Handling for folds
- Mouse support
Requirements
Neovim nightly
Installation
use 'lewis6991/satellite.nvim'
Usage
For basic setup with all batteries included:
require('satellite').setup()
If using packer.nvim Satellite can be setup directly in the plugin spec:
use {
'lewis6991/satellite.nvim',
config = function()
require('satellite').setup()
end
}
Configuration can be passed to the setup function. Here is an example with most of the default settings:
require('satellite').setup {
current_only = false,
winblend = 50,
zindex = 40,
excluded_filetypes = {},
width = 2,
handlers = {
search = {
enable = true,
},
diagnostic = {
enable = true,
},
gitsigns = {
enable = true,
},
marks = {
enable = true,
show_builtins = false, -- shows the builtin marks like [ ] < >
},
},
}
- The
:SatelliteDisable
command disables scrollbars. - The
:SatelliteEnable
command enables scrollbars. This is only necessary if scrollbars have previously been disabled. - The
:SatelliteRefresh
command refreshes the scrollbars. This is relevant when the scrollbars are out-of-sync, which can occur as a result of some window arrangement actions.
Configuration
There are various settings that can be configured. Please see the documentation for details.
Handlers
TODO
Documentation
Documentation can be accessed with:
:help satellite
Credit
This plugin was based on nvim-scrollview which provides a very good implementation for a normal scrollbar.