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

Hard to see highlighted occurrences of marked variable in dark theme #23

Closed
dcastil opened this issue May 9, 2020 · 10 comments · Fixed by #36 or #40
Closed

Hard to see highlighted occurrences of marked variable in dark theme #23

dcastil opened this issue May 9, 2020 · 10 comments · Fixed by #36 or #40

Comments

@dcastil
Copy link
Contributor

dcastil commented May 9, 2020

Thanks for the awesome theme, it immediately became my favourite one! 😍

However, I rely on VS Code highlighting all occurrences of a variable when my text cursor is placed in one. In the dark theme it is really hard to see those as the contrast between highlight and background is too low.

In following screenshot, the variable value occurs in lines 44, 67 and 72.

Screenshot 2020-05-09 at 17 19 30

@dcastil
Copy link
Contributor Author

dcastil commented May 9, 2020

Here are some dark themes for comparison:

Dark+ (VS Code default dark theme)

Screenshot 2020-05-09 at 17 30 15

Atom One Dark (theme I used before GitHub Dark)

Screenshot 2020-05-09 at 17 31 36

@rezyaev
Copy link

rezyaev commented May 13, 2020

@dcastil can you share font's name? sorry for being off-topic

@dcastil
Copy link
Contributor Author

dcastil commented May 13, 2020

@rezyaev It’s JetBrains Mono 😊

@renkun-ken
Copy link

Same issue here. It's very hard to find document highlight words provided by lsp:

image

@simurai
Copy link
Contributor

simurai commented May 15, 2020

Yeah, there are quite a few things that interplay with each other. Would be nice to avoid making things look muddy if too many things get layered on top of each other.

Have been playing around a bit and ended up with this:

img-2020-05-15-14 22 18

  • use a distinctive background color (blue) for selection that is different from the rest. So that it's always clear what is being "selected" by the user and what is additionally being "highlighted" by the editor.
  • use a green border for wordHighlight. So that it doesn't clash with the selection.
  • use a green background color for selectionHighlight and BracketMatch.
  • There still the a yellow background for findMatch when searching. But maybe doesn't overlap too often.

I'll see how that feels with the dark theme.

@dcastil
Copy link
Contributor Author

dcastil commented May 15, 2020

That looks really good! I had issues with selection and wordHighlight being indistinguishable in the Atom One Dark theme, so this would be a very welcome improvement.

@rezyaev
Copy link

rezyaev commented May 15, 2020

Yes, that's good!

@simurai
Copy link
Contributor

simurai commented May 15, 2020

And the dark version:

img-2020-05-15-21 09 06

Ok, I'll make PR and release it. We can always 🎻 fiddle a bit more with the colors later.

@dcastil
Copy link
Contributor Author

dcastil commented May 17, 2020

I'm still having some issues with the occurrences.

The problem is that wordHighlight highlights the actual occurrences of a variable while selectionHighlight highlights everything that matches the selected string like in search and replace. This means that it's still hard to figure out what the occurrences of a variable are.

Here is an example of a wordHighlight. The highlight is not standing out very much and it is easy to miss it, especially when dealing with larger functions with more nesting.

Screenshot 2020-05-17 at 10 16 06

The selectionHighlight is not so useful because it highlights more than just the occurrences. It's even dangerous because it might misleadingly highlight variables with the same name which actually aren't occurrences of this specific variable, here e.g. in line 206.

Screenshot 2020-05-17 at 10 16 27

A suggestion would be to turn the styling around: A border for selectionHighlight and a background color for wordHighlight while keeping the background color for selection. This would make sure to always keep focus on occurrences of a variable while making selection highlights less obtrusive. If more focus on selectionHighlight is needed, one can still use the file search.

@dcastil
Copy link
Contributor Author

dcastil commented May 17, 2020

@simurai I can't reopen this issue unfortunately. Could you do it?

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

Successfully merging a pull request may close this issue.

4 participants