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

Improve LSP diagnostics visually with distinct colors in edit area #2157

Closed
workingj opened this issue Apr 18, 2022 · 3 comments · Fixed by #2437
Closed

Improve LSP diagnostics visually with distinct colors in edit area #2157

workingj opened this issue Apr 18, 2022 · 3 comments · Fixed by #2437
Labels
A-theme Area: Theme and appearence related C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Extra attention is needed

Comments

@workingj
Copy link
Contributor

workingj commented Apr 18, 2022

Describe your feature request

Right now to my knowledge its only possible to set one color for the affected line(s) in the edit area via the theme

diagnostic = {fg = 'color1' , bg = 'color2' }

it would be nice to have some thing like this:

diagnostic.hint = {fg = 'color1' , bg = 'color2' }
diagnostic.warning = {fg = 'color1' , bg = 'color2' }
diagnostic.error = {fg = 'color1' , bg = 'color2' }

so the users can easier distinguish whats happening in the code

@workingj workingj added the C-enhancement Category: Improvements label Apr 18, 2022
@sudormrfbin sudormrfbin added E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Extra attention is needed A-theme Area: Theme and appearence related labels Apr 18, 2022
@TheSamsa
Copy link
Contributor

Aren't the colors covered with:
info, warning and error theme settings?

@workingj
Copy link
Contributor Author

Aren't the colors covered with:
info, warning and error theme settings?

@TheSamsa if I remember correctly, those are for the gutter area

@TheSamsa
Copy link
Contributor

I tested it and changing info for example does change the color of the diagnostics in the top right corner.
It was the diagnostic field you where talking about, right? Or did you mean changing the color of the code itself?

But it might be an idea to move those settings under the diagnostic namespace, it might be more clear.

@the-mikedavis the-mikedavis linked a pull request May 9, 2022 that will close this issue
archseer pushed a commit that referenced this issue May 20, 2022
* feat(theme): add separate diagnostic colors

This commit adds separate diagnostic highlight colors for the different
types of LSP severities. If the severity type doesn't exist or is
unknown, we use some fallback coloring which was in use before this
commit.

Some initial color options were also added in the theme.toml

Resolves issue #2157

* feat(theme): add docs for new diagnostic options

* feat(theme): adjust defaults & reduce redundancy

- the different colors for different diagnostic severities are now
  disabled in the default theme, instead diagnostics are just generally
  underlined (as prior to the changes of this feature)
- the theme querying is now done once instead of every iteration in the
  loop of processing every diagnostic message
mtoohey31 pushed a commit to mtoohey31/helix that referenced this issue Jun 15, 2022
* feat(theme): add separate diagnostic colors

This commit adds separate diagnostic highlight colors for the different
types of LSP severities. If the severity type doesn't exist or is
unknown, we use some fallback coloring which was in use before this
commit.

Some initial color options were also added in the theme.toml

Resolves issue helix-editor#2157

* feat(theme): add docs for new diagnostic options

* feat(theme): adjust defaults & reduce redundancy

- the different colors for different diagnostic severities are now
  disabled in the default theme, instead diagnostics are just generally
  underlined (as prior to the changes of this feature)
- the theme querying is now done once instead of every iteration in the
  loop of processing every diagnostic message
mtoohey31 pushed a commit to mtoohey31/helix that referenced this issue Jun 15, 2022
* feat(theme): add separate diagnostic colors

This commit adds separate diagnostic highlight colors for the different
types of LSP severities. If the severity type doesn't exist or is
unknown, we use some fallback coloring which was in use before this
commit.

Some initial color options were also added in the theme.toml

Resolves issue helix-editor#2157

* feat(theme): add docs for new diagnostic options

* feat(theme): adjust defaults & reduce redundancy

- the different colors for different diagnostic severities are now
  disabled in the default theme, instead diagnostics are just generally
  underlined (as prior to the changes of this feature)
- the theme querying is now done once instead of every iteration in the
  loop of processing every diagnostic message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-theme Area: Theme and appearence related C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants