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

Goto next diagnostic error? #1929

Closed
leeola opened this issue Apr 2, 2022 · 3 comments
Closed

Goto next diagnostic error? #1929

leeola opened this issue Apr 2, 2022 · 3 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@leeola
Copy link

leeola commented Apr 2, 2022

Would Helix be interested in a "Goto next diag error" command? Similar to goto_next_diag, but instead it goes specifically to an error severity.

I whipped up an example. Curious if ya'll are interested or not. A couple nitpicks with the idea/linked-code i have, for discussion sake:

  1. A specific error variant of this command feels... verbose and repetitive. A parameterized version of it which can be configured to go to a specific severity could support all variations of this idea. ie go to any diag, go to warning diags, go to error diags, etc. Though i'm not clear if Helix commands can be parameterized like that? Eg key = goto_next_diag(error) in config.toml.
  2. The above code needs tests. Not sure how to test that in this repo yet.
  3. The doc.diagnostics().last() (and first) fallback should also filter to the desired severity.

Appreciate any thoughts :)

@leeola leeola added the C-enhancement Category: Improvements label Apr 2, 2022
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Apr 2, 2022
@leeola
Copy link
Author

leeola commented Apr 3, 2022

Some minor improvements to the branch: https://github.com/leeola/helix/tree/22.03-diag-next-err

Perhaps i should just PR it. 🤷

@EpocSquadron
Copy link
Contributor

I do highly recommend a PR, you're very likely to get some eyes on it and constructive feedback. I could easily see this being merged once the kinks are worked out.

@leeola
Copy link
Author

leeola commented Apr 5, 2022

I'll close this then and open a PR once i have some additional time (soon i hope) to respond to PR feedback. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants