Skip to content

lsp symbols: avoid opening picker when query results match nothing #1630

Answered by ibhagwan
gennaro-tedesco asked this question in Q&A
Discussion options

You must be logged in to vote

When issueing require('fzf-lua').lsp_{live|workspace|document}_symbols({query=}) with the additional query parameters for symbols, the picker opens also in case no results are being matched by query. Is it possible to check the "return value" of said results before opening the picker window? I actually remember reading on a specific issue where you introduced such return value for the coroutine (but cannot find it anymore, unfortunately).

This would only possible when using async=false as with async queries we always open the UI and wait for results.

I have tried using the fzf default option --exit-0, which does indeed exit the picker, it however raises an exception

This is something …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ibhagwan
Comment options

You must be logged in to vote
1 reply
@ibhagwan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants