luisiacc / gruvbox-baby

Gruvbox theme for neovim with full 🎄TreeSitter support.
MIT License
390 stars 28 forks source link

Python decorator color is "soft_yellow" #51

Closed flaeppe closed 1 year ago

flaeppe commented 1 year ago

Attempted configuration is:

https://github.com/luisiacc/gruvbox-baby/blob/309b405d64af29126b1eb8d9be2f280ee2aec15d/lua/gruvbox-baby/theme.lua#L208

Although I'm only able to configure the highlight via PreProc:

PreProc = {fg = colors.forest_green}

(Just changed to some other color than orange or soft_yellow to detect what changes it)


Not sure if it's an upstream problem since it seems that https://github.com/vim-python/python-syntax links it under Define, which could be a reason why it ends up under PreProc(?) Ref: https://neovim.io/doc/user/syntax.html

Here's the line in vim-python/python-syntax I'm referring to: https://github.com/vim-python/python-syntax/blob/2cc00ba72929ea5f9456a26782db57fb4cc56a65/syntax/python.vim#L441

luisiacc commented 1 year ago

Ideally you wouldn't need the python-syntax package if you have treesitter. But however I'm also seeing it as yellow, so there is still a problem.

flaeppe commented 1 year ago

Yeah, not really sure why it's connected like that. Though I did figure out via https://github.com/nvim-treesitter/playground and :TSHighlightCapturesUnderCursor that @attribute(101), which is linked to TSAttribute is the highlight group that can change the decorator color.

But now I'm curious where the 101 number comes from.. Would be neat if @ character was still in @operator color.

crzdg commented 1 year ago

Maybe has to do with the addition of this?

https://github.com/luisiacc/gruvbox-baby/commit/5d3b1953cfe5eaa7515b5853e629d1dc9d713007#diff-64309265138b7f422659f196ce78d35f8cfaeac5b4371ff7b4c694d6fa5dcd56R143

luisiacc commented 1 year ago

Maybe has to do with the addition of this?

I don't think is related. Is more like is not applying the custom highlight schemas I have on the plugin for the decorator.

crzdg commented 1 year ago

Maybe has to do with the addition of this?

I don't think is related. Is more like is not applying the custom highlight schemas I have on the plugin for the decorator.

@flaeppe I'm just a little confused about the title, "Python decorator color is "soft_yellow". Shouldn't it be "soft_yellow"?

https://github.com/luisiacc/gruvbox-baby/commit/5d3b1953cfe5eaa7515b5853e629d1dc9d713007#diff-64309265138b7f422659f196ce78d35f8cfaeac5b4371ff7b4c694d6fa5dcd56R143

@luisiacc Definitely has some effects on the decorators, as for now my decorators are in the color of foreground and they were yellow previously. I do not know if this color change is intended with the move to the new TS hl-groups?

If I change the hl I linked the decorators' color changes, but also the hl of the list of imported packages.

However, not sure if this should be part of this issue or if I should open a new one?

flaeppe commented 1 year ago

Shouldn't it be "soft_yellow"?

I was looking here https://github.com/luisiacc/gruvbox-baby/blob/309b405d64af29126b1eb8d9be2f280ee2aec15d/lua/gruvbox-baby/theme.lua#L208

Perhaps that's the incorrect place? At least it seems that it's intended to be orange

(Maybe the title could've read "Python decorator isn't orange" 🙂)

luisiacc commented 1 year ago

Fixed @crzdg , @flaeppe, now it's orange.

crzdg commented 1 year ago

Fixed @crzdg , @flaeppe, now it's orange.

Sorry to re-open this. But the Python decorator was yellow, I guess "soft_yellow" before. Did you intentionally change it to orange or did you want to revert to the color previously used? IMO, the orange makes it a bit nervous if you define i.e. classes with multiple properties and so on. I will add a screenshot later.