ellisonleao / gruvbox.nvim

Lua port of the most famous vim colorscheme
MIT License
1.81k stars 195 forks source link

[FEATURE] Ability to add extra options to hightlights #351

Open h3xOo opened 1 month ago

h3xOo commented 1 month ago

Is your feature request related to a problem? Please describe.

I want to make small tweaks (make some treesitter groups bold, some italic etc). I thought about some clever use of overrides = {}, but neovim doesn't currently support highlight constructs like { link = "GruvboxAqua", bold = true }. So I would have to either use plain colors from configuration, which I don't like, since I often change light and dark theme (I would have to change these values), or just forget about extra italics/bolds etc.

Describe the solution you'd like

I thought about something like:

require("gruvbox").setup({
    extras = {
        ["@boolean"] = { bold = true }
    }
}

This of course would use default colorscheme for @boolean but would add bold = true. Or if it would be to painful to implement, maybe some predefined treesitter groups, like keyword, boolean, Macro, Directive, function etc.

h3xOo commented 1 month ago

As I looked into some other schemes, they allow overrides to be a function(colors) which returns table of overridden highlight groups.