luisiacc / gruvbox-baby

Gruvbox theme for neovim with full 🎄TreeSitter support.
MIT License
402 stars 28 forks source link

Search highlight not readable when the matching text is in foreground color and transparent mode is on #48

Closed HuabeiYou closed 1 year ago

HuabeiYou commented 2 years ago

Hi there, first of all thanks for making this colorscheme!

I had problem reading the search result when the original text is in foreground color.

Screen Shot 2022-11-20 at 11 57 10

After some digging I think it's due to the combination of

if config.transparent_mode then
  local transparent = {
    background = colors.none,
    background_dark = colors.none,
  }
  colors = vim.tbl_extend("force", colors, transparent)
end

and

Search = { fg = c.background, bg = c.foreground }

I temporarily fixed it by setting the bg to medium_gray in my config.

Search = { fg = c.background, bg = c.medium_gray }
Screen Shot 2022-11-20 at 11 57 43

I see there is already a block handling transparent mode configurations

if config.transparent_mode then
  theme.base = vim.tbl_extend("force", theme.base, {
    Visual = { bg = c.medium_gray },
    MultiCursor = { bg = c.medium_gray },
    Cursor = { bg = c.soft_green, c.dark }
  })
end

Maybe Search should also be added there

chaudry-786 commented 1 year ago

This Commit messed up Search highlight for me. I can't see any highlighted text instances. Screenshot from 2022-12-02 19-18-40

As you can see on the left hand side, all the "Plug" instances are now same colour as background and hidden. Right is what it used to be (I pointed to previous commit and it seems to be working fine. Plug("luisiacc/gruvbox-baby", {commit = "ea71b4225d0140103d99748ca4a33ecf22c03f62"})

chaudry-786 commented 1 year ago

Another issue if highlight fg is "milk" then unable to read highlighted instances. See screenshot below Screenshot 2022-12-07 at 12 21 45

luisiacc commented 1 year ago

could you check again? I changed it.

chaudry-786 commented 1 year ago

Fixed. thanks