satellite.nvim
satellite.nvim copied to clipboard
Expose enable / disable Lua interface
Is your feature request related to a problem? Please describe. No
Describe the solution you'd like
Expose enable
and disable
to the Lua interface for better Lua integration
Describe alternatives you've considered
I could use a function to call vim.cmd('SatelliteEnable')
(or disable), but those Lua interface would be nice
Additional context
Mind that if it get implemented, both calls could be run before setup
. So a call guard might be needed to prevent unexpected behavior.
Do you have valid use cases to why you want an API for this? Asking for things without any justification other than "it would be nice" doesn't really fly.
Asking for things without any justification other than "it would be nice" doesn't really fly
Fair point. My use case was to plug the enable/disable function into my callback directly without a need to use vim.cmd
.
Here's the code in my dotfiles that would be benefit by using a lua interface: https://github.com/spywhere/dotfiles/blob/de33a0b0a700b01a57b406db92dc3be57a057a8b/configs/nvim/lua/plugin/appearance/satellite.lua#L40
It looks like what you actually want is:
require('satellite').setup {
current_only = true,
}
No, that piece of code was to show the scrollbar for a certain amount of time before hiding it, then show it again once I moved the cursor or scroll the window (or etc.).