rktjmp / lush.nvim

Create Neovim themes with real-time feedback, export anywhere.
MIT License
1.44k stars 47 forks source link

TreeSitter group names #48

Closed Davincible closed 3 years ago

Davincible commented 3 years ago

I'm creating a treesitter theme, but I am having some issues with some group names. Currently testing with Go. For example, the TS groups var_declaration, const_declaration, function_declaration, select_statement now all fall under the group TSKeyword, meant for 'other' keywords, including the function declaration, which I would expect under the TSKeywordFunction group.

Is it possible to create seperate groups for these?

rktjmp commented 3 years ago

Lush should just make whatever highlight groups you tell it to, it's up to TreeSitter, etc to apply those groups.

return lush(function()
  return {
    MyCustomGroup { fg = red }, -- custom group
    LightspeedLabel { fg = green }, -- plugin group
    TSKeywordFunction { ... },
    -- etc etc
  }
end)

So I think your problem might be with the Go TreeSitter plugin not applying its groups with enough specificity? I haven't used TS since it became mainlined though so I am only guessing.

Davincible commented 3 years ago

You're right. After some more digging I found out it's indeed not related to this plugin. Thanks for the pointers