ellisonleao/gruvbox.nvim

[BUG] Overriding with `bold = false` has no effect (while `bold = true` overrides)

Galicarnax opened this issue · 2 comments

Describe the bug

In the default setup, function and method names are in bold, and I want then in normal font. I don't want to put bold = false in config, as I need bold in other parts. So I apply overriding:

      overrides = {
        ["@lsp.type.function"] = { bold = false },
        ["@lsp.type.method"] = { bold = false },
      }

but this has no effect. Yet, if I also override colors:

      overrides = {
        ["@lsp.type.function"] = { fg = "#8ec07c", bold = false },
        ["@lsp.type.method"] = { fg = "#8ec07c", bold = false },
      }

the color is overridden, but the boldness is not (still bold).
If I override the other way round, e.g.:

      overrides = {
        ["@lsp.mod.readonly"] = { bold = true },
      }

this works (constants in C++ become bold).

Expected behaviour

Highlight groups overridden with bold = false should not remain in bold.

@Galicarnax I was able to remove the bold from functions for all languages with the following config:

        overrides = {
          Function = { link = 'GruvboxGreen' },
        },

Looking at the source, I see:

    Function = { link = "GruvboxGreenBold" },

If you dig a little deeper, you can find settings for specific languages.

I'm not sure about the ["@lsp.mod.readonly"] key and why that doesn't work.

Thanks, I'll use this workaround for now.

I'm not sure about the ["@lsp.mod.readonly"] key and why that doesn't work.

I used this specific highlight group only as an example, to show that override with bold = true does work - non-bold highlight becomes bold (while override with bold = false does not work - bold highlight does not become non-bold).