ellisonleao/gruvbox.nvim

DiffAdd and DiffRemoved randomly cannot be overridden

hanschen opened this issue · 1 comments

Describe the bug
When I try to override DiffAdded and DiffRemoved using overrides, it sometimes works, but sometimes they remain linked to DiffAdd and DiffDelete.

I tried to debug this using a clean config and guess that it could be caused by the following lines:

gruvbox.nvim/lua/gruvbox.lua

Lines 1017 to 1018 in 0940564

["@text.diff.add"] = { link = "diffAdded" },
["@text.diff.delete"] = { link = "diffRemoved" },

because when I use diffAdded/diffRemoved in overrides instead, it seems to work as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Load the plugin using
require("gruvbox").setup({
  overrides = {
    DiffRemoved = { fg = "#ff0000" },
  },
})
vim.cmd("colorscheme gruvbox")
  1. Open nvim.
  2. Check :highlight DiffRemoved.
  3. Sometimes it say DiffRemoved xxx links to DiffDelete.

Expected behavior
The override should always be applied.

I just saw that diffAdded etc. should always start with a lowercase letter, so I guess this was a user error. Closing.