-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LSP] Add variable symbol gathering to symbol filler #1949
[LSP] Add variable symbol gathering to symbol filler #1949
Conversation
…ling Signed-off-by: Jan Bylicki <[email protected]>
…s test Signed-off-by: Jan Bylicki <[email protected]>
28c1e5f
to
b4e9fbf
Compare
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #1949 +/- ##
==========================================
+ Coverage 92.83% 92.85% +0.01%
==========================================
Files 355 355
Lines 26073 26129 +56
==========================================
+ Hits 24206 24261 +55
- Misses 1867 1868 +1
☔ View full report in Codecov by Sentry. |
There are typically a lot of variables so I fear the output of such a symbol outline will be very 'noisy'. That is the reason why I didn't include these in the original implementation as it would make the tree less useful and visually overwhelming. However, I could be convinced if the more noisy tree would actually be useful in practice. Are there ways on the client (e.g. the tree view in vscode) to keep out certain elements ? Maybe we can provide a flag to configure if it should be included ? |
I will look into what filtering options the most popular editors provide for outlines (VSCode, neovim) and I will probably add a flag either way. The default will be probably determined by the quality of those options if they exist |
Editor filtering options for outlines / symbol listsConsistent finding for me is that most of the "big" files are not that huge in terms of outline size maybe besides generated How popular editors handle outlinesVSCodeAllows for sorting by type of symbol (struct, var, module/function) inside the outline. Goto symbol allows for searching within the outline for the desired symbol and is decently responsive. Usability will probably not decrease by a lot with variables included into the outline. Neovim (default LSP client)Using "raw" Neovim (coc.nvim)
Neovim (symbols-outline.nvim)This plugin adds a structured view that can collapse nodes simmilar to Neovim (vista)In vista, there are multiple providers for structure. In my case, I have tested HelixThe symbol outline is piped into the fuzzy finder, like almost everything searchable in helix. It does not currently distinguish by type of symbol, but the search is effortless. The default sorting is by position in the file. There is little to no difference in usability in my opinion to how difficult it is to find a symbol with variables added to the outline. ConclusionTherefore, I'd say that a flag that would enable/disable variables in outlines should have a default such that variables are included. It is the behavior of popular LSP servers ( |
Signed-off-by: Jan Bylicki <[email protected]>
a023542
to
627b552
Compare
Yes, sounds good! |
This PR adds variables to symbol gathering for
outline
-like features in editors. Tested to work as expected incoc.nvim
, as did the original issue and in builtinhelix
lsp handlerFixes #1882