ribru17 / bamboo.nvim

Warm Green Theme for Neovim and Beyond
Other
320 stars 11 forks source link

Add Namespace hl group #19

Closed Fergus-Molloy closed 8 months ago

Fergus-Molloy commented 8 months ago

Adds Namespace highlight group which is the same as @module. Changes things that refer to @module to refer to Namespace instead.

ribru17 commented 8 months ago

Thank you for the PR! I am a bit curious as to the motivation though. Most other highlight groups with a dedicated name (Macro, Keyword, etc.) are just because these are the names of the syntax highlighting groups defined in Vim. Other Tree-sitter captures like @module (previously @namespace) didn't have their own syntax group fallback so they would link to something else, or just be given their own dedicated highlight. So I think it is kind of unnecessary to add this, unless perhaps nightly has added a Namespace syntax highlight group that I am unaware of

Fergus-Molloy commented 8 months ago

previous to using bamboo i was using gruvbox-material which has a Namespace highlight group. I use this highlight group with indent-blankline to colour scopes which is how i noticed that it was missing from this theme. I thought it would be helpful to add it to the main repo rather than use a workaround/fork

ribru17 commented 8 months ago

Ah, I see. Doing some digging I think gruvbox-material may be one of the only ones to define this group; others like catppuccin and tokyonight do not, and it is not an official group for the builtin syntax highlighting. Gruvbox-material probably just added this non-standard highlight as a convenience name amongst themselves. Would you be opposed to using @module for your indent-blankline scopes? It will still work with gruvbox-material. This is the supported group for highlighting namespaces (defined by Tree-sitter upstream) and will also work if you decide to try out the aforementioned themes. I am a bit hesitant to merge this just because it is not standard (even though it is not harmful, of course)

Fergus-Molloy commented 8 months ago

yeah i can use @module instead, thanks for taking the time to look at this :)