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

Add a workspace diagnostics indicator to the status line #4540

Closed
dariooddenino opened this issue Oct 31, 2022 · 2 comments · Fixed by #4569
Closed

Add a workspace diagnostics indicator to the status line #4540

dariooddenino opened this issue Oct 31, 2022 · 2 comments · Fixed by #4569
Labels
A-gui Area: Helix gui improvements C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@dariooddenino
Copy link
Contributor

Status lines have yellow/red icons with numbers to indicate how many warning/errors are present in the current buffer.

I think it would be useful to display the workspace total too there to get a quick visual feedback instead of having to manually input <space>-D to open the workspace diagnostics picker.

Some ideas:

  1. Use a number format like 1/13, meaning that the current buffer has 1 warning/error and the workspace has 13 in total.
  2. Use two completely different sets of numbers/icons for buffer diagnostics and workspace diagnostics.
  3. Add a workspace status line at the bottom that spans the whole application window width and which could hold more general information (like workspace diagnostics).
@dariooddenino dariooddenino added the C-enhancement Category: Improvements label Oct 31, 2022
@kirawi kirawi added E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors A-gui Area: Helix gui improvements labels Nov 1, 2022
@dariooddenino
Copy link
Contributor Author

I was giving a quick look at this, and I have it down more or less but I'm confused by something.

We have both lsp::DiagnosticSeverity, which is what's stored in context.editor.diagnostics and helix_core::diagnostic::Severity returned by context.doc.diagnostics().

Is there a reason for having two different data structures (that apparently have the same purpose) returned by two similar functions?

@the-mikedavis the-mikedavis linked a pull request Nov 2, 2022 that will close this issue
@the-mikedavis
Copy link
Member

lsp::DiagnosticSeverity is from the lsp_types crate https://docs.rs/lsp-types/latest/lsp_types/struct.DiagnosticSeverity.html while helix_core::diagnostic::Severity is custom. The lsp_types one is a struct with constants while the custom one is an Enum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-gui Area: Helix gui improvements C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants