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

Lines containing syntax errors are impossible to read #60

Closed
mojodna opened this issue Jun 12, 2019 · 4 comments · Fixed by #62
Closed

Lines containing syntax errors are impossible to read #60

mojodna opened this issue Jun 12, 2019 · 4 comments · Fixed by #62

Comments

@mojodna
Copy link

mojodna commented Jun 12, 2019

image

@arcticicestudio
Copy link
Contributor

Hi @mojodna 👋, thanks for your contribution 👍
I remember I once tried to fix this by reducing the opacity of the color, but I think there were problems with IntelliJ's highlighting API regarding the rendering and support of transparent colors.
We can try again if this has been solved and maybe use the same colors like for the UI theme's FileColors keys (1A = 26% opacity).

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Jun 14, 2019

I guess the problem here is that the whole line is highlighted with nord11 because of the styles defined for IntelliJ's Code Inspection feature (ERRORS_ATTRIBUTES editor scheme key) mixed with the foreground color for syntax errors that is also nord11.
This results in nord11 foreground on nord11 background.

I've tried to use a opacity of 60% for nord11 as background color instead, but the result is a "dirty redish" color due to the base editor background color, so I thought about a better way of highlighting these errors.

Reduced opacity of 60%

I came up with a styling that doesn't make use of a background color at all based on the fact that it is a duplicate highlighting. If there's a syntax error the invalid tokens will be highlighted with nord11 due to the syntax error so there is no need to additionally colourize the background with nord11 resulting in unreadable text due to the same foreground color.

The new styles for Code Inspection errors will simply use nord11 as foreground color with a bold underline and the already used stripe next to the line numbers. This design decision also comes with a change for the “Unknown Symbol“ highlighting (WRONG_REFERENCES_ATTRIBUTES color scheme key) that will now use a dotted underline instead to differentiate from the new error styles.

Improved error and Unknown Symbol styles

@mojodna
Copy link
Author

mojodna commented Jun 14, 2019

Nice!

@arcticicestudio arcticicestudio added this to the 0.7.0 milestone Jun 15, 2019
@arcticicestudio arcticicestudio self-assigned this Jun 15, 2019
svengreb pushed a commit that referenced this issue Jun 15, 2019
A line that contained both a syntax error as well as a
"IntelliJ Code Inspection" (`ERRORS_ATTRIBUTES` editor scheme key) error
was unreadable because both error detection scopes/types applied their
different highlighting styles resulting in a background and foreground
color colorized with `nord11`. This made it impossible to read the text.

Some tests using a opacity of 60% for `nord11` as background color
instead resulted in a "dirty redish" color due to the miy with thge base
editor background color.

Therefore a better style of highlighting these errors has been designed.
The new style doesn't make use of a background color at all based on the
fact that it is a duplicate highlighting. If there's a syntax error the
invalid tokens will be highlighted with `nord11` due to the syntax error
so there is no need to additionally colorize the background with
`nord11` which is the main reson for the unreadable text.

The new styles for "Code Inspection" errors has been simplified to use
`nord11` as foreground color with a bold underline and the already used
error stripe next to the line numbers. This design decision also comes
with a change for the "Unknown Symbol" highlighting
(`WRONG_REFERENCES_ATTRIBUTES` color scheme key) that now uses a
dotted underline instead to differentiate from the new error styles.

GH-60
@arcticicestudio
Copy link
Contributor

arcticicestudio commented Jun 15, 2019

The changes will be merged in #62 and released with the next release version 0.7.0.

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

Successfully merging a pull request may close this issue.

2 participants