This is an automated archive made by the Lemmit Bot.
The original was posted on /r/neovim by /u/_skrrr on 2024-11-08 16:58:07+00:00.
Hey,
I’ve just released the second version of symbols.nvim. There are some nice incremental improvements and small fixes.
symbols.nvim sidebar with different filetypes
I would love to get some feedback.
Are there any languages that you would like to be supported? Of course, symbols.nvim works works for any language that has an LSP server available but the output is often noisy and can be improved for displaying in the sidebar. Some other languages may require custom logic, for example, using treesitter.
Are there any missing features that prevent you from using symbols.nvim? Any ideas for improvement? Any bugs that you’ve encountered?
I have some ideas that I’ll be expermienting with. Mostly trying to make navigation within a single file easier and faster.
Changes
Breaking
- changed keymappings: “tc” -> “tch” (toggle-cursor-hiding) and “tf” -> “tcf” (toggle-cursor-follow)
- moved “hide_cursor” setting from the top level to “sidebar.hide_cursor”
Features
- better messages on provider (LSP) fail
- new commands: “SymbolsToggle” and “SymbolsOpen”
- treesitter based JSON and JSON Lines provider
- keymaps for decreasing (“t[”) and increasing (“t]”) max width
- “close on goto” config setting and toggle (“tg”)
- “auto preview” config setting
- notifications when changing toggles
- symbols filter toggle (“tf”)
Notes:
- Added a separate message for when the provider times out. This is especially useful when opening a new filetype as the LSP servers suffer from cold starts and the first request might take longer. Previously there was only a very generic message: “lsp failed”, it’s still there but only used when the LSP server fails. Additionally, increased the default timeout for LSP servers from 1s to 2s which should make the time outs less likely.
- More options for setting up your keybinding to open/close the sidebar.
- I wanted to see what the benefits and drawbacks of implementing treesitter providers may be. The upside is that they do not require the user to have a specific LSP server installed and it’s much easier to customize what symbols are provided and their inline details messages. The downsides are that it’s more code to write and maintain. It’s also slower than a dedicated LSP and because of that by default the LSP server is used.
- Change the width and keep it on auto resize. Works with a count, so “5t]” will increase the width by 25.
- When “close on goto” is on the sidebar will close after going to a symbol.
- There already was a toggle for “auto preview”, now there is also a setting.
- A small bar pops up at the bottom of the sidebar after toggling any setting. It’s useful when a toggle doesn’t produce any immediate visual changes.
- Allows to see all the symbols provided by the provider. Mostly useful for debugging.