-
Notifications
You must be signed in to change notification settings - Fork 134
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
Some workspace symbols are missing when using lsp_workspace_symbols()
#44
Comments
Probably a different |
I looked into both Telescope’s I did notice however that it takes time for the LSP server to load up all the results, sometimes depending on what file you’re at, is it possible you first used the regular call and then the dynamic and the LSP populated more symbols in the meantime? Did you try to switch to dynamic/regular back and forth? I recently added an option to use the blocking version of the LSP calls by adding |
I've tried to call them one after the other a few times from different files and the result is the same, some symbols are missing in regular(non-dynamic) version of Telescope. It's hard to gauge the total amount of symbols since Telescope limits to 128.
I tried it and found no difference. The results seems the same compared to regular(non-dynamic) Telescope. |
I have an idea! |
This has to be it, unfortunately that means the solution is rather complex as I have to use fzf’s |
Ok so the best I could do now was add It works well, the only caveat is that the way it's currently supported via Test it out and lmk what you think? |
Opened |
Both issues here stem from the fact that fzf here doesn’t act as as a fuzzy finder anymore, the way I can add sorting before returning the results to fzf which might make it a bit more intuitive but it still won’t be exactly what you want, it will just be sorted but it doesn’t guarantee the most relevant results will be first. One option is to add a keybind that once pressed changes fzf back to fuzzy mode which will stop sending dynamic LSP requests and fuzzy search the current result set but this sounds very convoluted and unintuitive. The “real solution” to your issue here is adding another fuzzy algorithm on top which would fuzzy find and highlight the results before returning them to fzf, something like native lua fzf/fzy - sounds like another plug-in you know lol? Bottom line, I can add sorting for you to try if you wish but that’s about all I can do without having to rewrite this as Telescope. |
Got it. Thanks for the detailed explanation! And thank you for your efforts! |
On the plus side, turns out I missed a function in nvim-fzf so I can make this asynchronous (as I planned originally) for slightly better performance. |
The async version doesn’t seem to make a big difference here, I’m gonna leave it as is for now and close this issue. |
If you’re still interested in this I just discovered sk --ansi -i -c 'rg --color=always --line-number "{}"' When in the If you set |
Thanks for letting me know about this! |
I reworked :lua require('fzf-lua').lsp_live_workspace_symbols({ exec_empty_query = false, continue_last_search = false }) |
However, Telescope's
lsp_dynamic_workspace_symbols()
show them all while Telescope'slsp_workspace_symbols()
have some of them missing as well.I quickly glanced through Telescope's source and did not figure out the reason. I see both Telescope's dynamic/regular calls are using the same "workspace/symbol" LSP method.
The text was updated successfully, but these errors were encountered: