SmiteshP / nvim-navbuddy

A simple popup display that provides breadcrumbs feature using LSP server
Apache License 2.0
770 stars 30 forks source link

More intelligent scrolling #7

Closed ColonelPhantom closed 1 year ago

ColonelPhantom commented 1 year ago

Currently, navbuddy scrolls to the selected scope, but doesn't try to maximize how much of it is shown. As such, with scrolloff=0, it scrolls down to view only the first line, but not the rest of a fairly short block. That kind of minimizes the amount of useful information displayed in the text window.

Would it be possible to make this scrolling more intelligent, so that the plugin tries to for example put the first line at the top of the view, and/or makes the entire block visible (if it fits)?

SmiteshP commented 1 year ago

Yes, this should be possible to do. Let me see how this can be done 🤔

SmiteshP commented 1 year ago

Added option reorient to address this