VidocqH / lsp-lens.nvim

Neovim plugin for displaying references and difinition infos upon functions like JB's IDEA.
MIT License
252 stars 15 forks source link

[Enhancement] trigger lens only for current scope #12

Open gennaro-tedesco opened 1 year ago

gennaro-tedesco commented 1 year ago

Thank you for the great plugin, it is awesome!

What do you think about allowing the users to trigger the plugin only when in the current function scope, rather than showing all the references for all functions in a buffer? I find that having a code lens with references is fantastic, however it may sometimes clutter the screen (and slow down scrolling and movements, probably due to extensive treesitter parsing); as such, a great quality-of-life improvement would be to only show the code lens for the function my cursor is in.

Likewise, a similar option could be to trigger to toggle the lens on CursorHold and then re-toggle it off automatically when the cursor moves (or similar mechanics).