Skip to content
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

Better handling of wrong queries #19

Open
lyz-code opened this issue Dec 23, 2024 · 0 comments
Open

Better handling of wrong queries #19

lyz-code opened this issue Dec 23, 2024 · 0 comments

Comments

@lyz-code
Copy link

Right now if a user enters a wrong query, such as test the plugin fails bad:

�[31mError:�[0m cannot parse search emails query `test`
   �[38;5;246m╭�[0m�[38;5;246m─�[0m�[38;5;246m[�[0mquery:1:2�[38;5;246m]�[0m
   �[38;5;246m│�[0m
 �[38;5;246m1 │�[0m �[38;5;249mt�[0m�[3
1me�[0m�[38;5;249ms�[0m�[38;5;249mt�[0m
 �[38;5;240m  │�[0m  �[31m┬�[0m  
 �[38;5;240m  │�[0m  �[31m╰�[0m�[31m─�[0m�[31m─�[0m found e expected `to`
�[38;5;246m───╯�[0m
Error detected while processing function <lambda>9922[1]..<SNR>45_on_exit[6]..function <lambda>9922[1]..<SNR>45_on_exit:
line    6:
E605: Exception not caught: CLI error, see :messages for more information

This added to the fact that it's not easy to find the documentation on how to make good queries (from within nvim) makes the functionality confusing to newcomers.

It would be nice to capture the error and guide the user on how to make good queries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant