jdinhify / vscode-theme-gruvbox

Gruvbox theme for vscode based on https://github.com/morhetz/gruvbox
https://marketplace.visualstudio.com/items?itemName=jdinhlife.gruvbox
MIT License
267 stars 63 forks source link

Python syntax highlighting is worse after the latest update #82

Open dgudim opened 8 months ago

dgudim commented 8 months ago

Before (variables, function calls and definitions are kinda separated) image

After (everything is blue and yellow now, even less separation) image

song-dog commented 8 months ago

@dgudim I just spent the last 3 hours banging my head against the wall trying to figure out why all of a sudden my syntax highlighting had suddenly changed. I believe I finally traced the culprit back to this extension, and specifially the update from yesterday re: semantic highlighting. Once i switched that setting from "configuredByTheme" to "false", everything went back to normal.

semanticHighlighting-0

Alternatively you can override the semantic highlighting rules yourself if you prefer.

semanticHighlighting-1
dgudim commented 8 months ago

@song-dog oh my god, thanks. The theme is probably missing colors for semantic token scopes

jdinhify commented 8 months ago

@song-dog @dgudim apologies for the inconvenience

there's another PR to enhance these semantic token, but I think it won't address your issue

so could you please try either these settings and let me know which would be more helpful to you 🙏

1.

"editor.semanticTokenColorCustomizations": {
  "rules": {
    "builtinConstant": "#d3869b",
    "property": "#8ec07c",
    "parameter": "#83a598",
    "variable": "#ebdbb2",
    "magicFunction": "#fe8019",
    "function": "#fe8019",
    "method": "#fe8019"
  }
},
Screen Shot 2023-10-26 at 6 37 04 pm

2.

"editor.semanticTokenColorCustomizations": {
  "rules": {
    "builtinConstant": "#d3869b",
    "property": "#ebdbb2",
    "parameter": "#83a598",
    "variable": "#8ec07c",
    "magicFunction": "#fe8019",
    "function": "#fe8019",
    "method": "#fe8019"
  }
},
Screen Shot 2023-10-26 at 6 37 32 pm
dgudim commented 8 months ago

@jdinhify The first one looks better IMO

jdinhify commented 8 months ago

83 has been merged & published

dgudim commented 8 months ago

Can we differentiate between 'magic' and regular functions? (file and main) for example?

jdinhify commented 8 months ago

Can we differentiate between 'magic' and regular functions? (file and main) for example?

I work mainly with JS/TS & don't see these magic functions often (or ever) so not sure about the importance of the distinction. In python, looks like the __ wrappers are already used to differentiate?

What would you think is a good colour if have to choose? Colours to pick below - I tried them and thought that the current setting (same colour) is the most ok:

fb4934
fabd2f
83a598
d3869b
8ec07c
fe8019
dgudim commented 8 months ago

Ok, maybe leave it as default then, I'll change it locally, probably to darker orange or dark magenta

dgudim commented 8 months ago

I have 1 more question though, even without semantic highlighting image

Some of the stuff is orange now, format string was red, number was purple and False was purple

dgudim commented 8 months ago

And this is also orange now, was red. Although both variants look bad image

jdinhify commented 8 months ago

I have 1 more question though, even without semantic highlighting image

Some of the stuff is orange now, format string was red, number was purple and False was purple

There a new version published, it should be more aligned with pre-semantic highlighting, please have another try 🙏

jdinhify commented 8 months ago

And this is also orange now, was red. Although both variants look bad image

there was never a background set for matchHighlight in peekView a new version has been published, using gray as background for more neutral highlighting

dgudim commented 8 months ago

@jdinhify It's almost perfect ❤️ I have some suggestions though

  1. Make modules a different shade of yellow, maybe a little darker
  2. Make magic functions/variables different color from regular functions/variables (or maybe italic?)

image

And also, where can I donate?

alecdwm commented 8 months ago

I wasn't a huge fan of the new colours in the v1.16.0 version of Gruvbox for Typescript JSX, so I added two overrides:

"editor.semanticTokenColorCustomizations": {
  "[Gruvbox Dark Medium]": {
    // use the same variable and function colors for semantic syntax highlighting `on` and `off`
    "rules": { "variable": "#83a598", "function": "#fabd2f" }
  }
},
Screenshot 2023-10-31 at 02 38 05 *semantic highlighting disabled* --- Screenshot 2023-10-31 at 02 38 25 *semantic highlighting enabled (default colors)* --- Screenshot 2023-10-31 at 02 38 34 *semantic highlighting enabled (with color overrides)*
dgudim commented 8 months ago

That's not python though

alecdwm commented 8 months ago

Yeah! My comment is only relevant to the new syntax highlighting, not specifically how it affects python.
That being said, the changes should apply to any language.

jdinhify commented 8 months ago

thanks @alecdwm

there's a discussion for TS in #85 , let's discuss over there

I found out in the past few days that semantic tokens colouring can be applied to specific languages, and I'm not a python user so I'd respect the input of python users, so will try to make changes to TS (probably the default since I'm using TS too) while not affecting python as requested here

jdinhify commented 8 months ago

@jdinhify It's almost perfect ❤️ I have some suggestions though

  1. Make modules a different shade of yellow, maybe a little darker
  2. Make magic functions/variables different color from regular functions/variables (or maybe italic?)

image

And also, where can I donate?

thanks @dgudim ,

  1. I'm not familiar with python, what are these "modules"? Could you provide an example snippet
  2. Would you think a darker version of functions would be ok? Variables might be trickier since vscode doesn't have a magicVariable, just builtin so it will affect all builtin variables, but I guess builtin are magic. If we're using a darker version for magic functions, I think we'll probably use a darker version for builtin variables too
dgudim commented 8 months ago

@jdinhify

  1. image Here are the modules

  2. I was thinking an italic version with the same color for magic functions and italic purple for magic variables. As for the scope, there is support.variable.magic.python textmate scope, but maybe coloring all builtins would also be fine