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

Sort diagnostics by severity in diagnostics picker #5026

Closed

Conversation

zummenix
Copy link
Contributor

@zummenix zummenix commented Dec 6, 2022

Usually as a developer you want to fix errors first and then warnings, so let's show errors first in diagnostic picker.

When sorting I use lsp::DiagnosticSeverity::HINT as a default value in case a diagnostic doesn't have a severity. Initially I was trying to make the lowest severity possible using lsp::DiagnosticSeverity's constructor but it's private.

While preparing a PR I thought that behaviour of [d and ]d must also be consistent with that in the picker. Currently this is not the case. Therefore I'll make this PR as a draft to gather feedback.

Closes #3543

@pascalkuthe pascalkuthe added the S-waiting-on-review Status: Awaiting review from a maintainer. label Dec 7, 2022
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Dec 9, 2022
@zummenix zummenix closed this Dec 10, 2022
@zummenix zummenix deleted the sort-diagnostics-by-severity branch December 10, 2022 11:41
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 S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort diagnostics by gravity (error -> warning -> info)
3 participants