Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Setting transparency = false still has transparency #243

Closed
mizlan opened this issue Feb 15, 2024 · 15 comments
Closed

bug: Setting transparency = false still has transparency #243

mizlan opened this issue Feb 15, 2024 · 15 comments
Labels

Comments

@mizlan
Copy link

mizlan commented Feb 15, 2024

Neovim version (nvim -v)

v0.10.0-dev-1999+g6f6abd8c0

Terminal / multiplexer

Neovide

Describe the bug

Seems like blend is still used when transparency is disabled

Repro

require('rose-pine').setup({
        dark_variant = 'moon',
        disable_italics = true,
        styles = {
          bold = true,
          italic = true,
          transparency = false,
        },
...
@mizlan mizlan added the bug label Feb 15, 2024
@mvllow
Copy link
Member

mvllow commented Feb 15, 2024

Could you elaborate on what blend you mean? If your window is transparent that's unrelated. Screenshots would be helpful :)

@mizlan
Copy link
Author

mizlan commented Feb 16, 2024

Sure, sorry, was in a hurry when I posted the original issue. I use Neovide, which currently doesn't render blend properly, because it will bleed the desktop wallpaper through. Here is the link issue, which has a screenshot: neovide/neovide#2327 I tried disabling blend in the colorscheme with

        highlight_groups = {
...
          GitSignsAdd                = { fg = "#bacfc4" },
          GitSignsChange             = { fg = "#e6d2c1" },
          GitSignsDelete             = { fg = "#dbb6b4" },
...

and with both 0 and 100 values, but it doesnt work. Also, like i said in the original comment, disabling transparency doesnt seem to work either.

@mvllow
Copy link
Member

mvllow commented Feb 16, 2024

Oh I see, appreciate the extra info. This could definitely be improved from our side once I have some time but until then:

highlight_groups = {
          GitSignsAdd                = { fg = "#bacfc4", inherit = false },
          GitSignsChange             = { fg = "#e6d2c1", inherit = false },
          GitSignsDelete             = { fg = "#dbb6b4", inherit = false },
}

By default, these groups are being merged with the groups from the theme. Setting inherit = false should fix your issue for those groups at least. Note, you may need to update the background as well.

@mizlan
Copy link
Author

mizlan commented Feb 27, 2024

Seems that it's still occurring

@mvllow
Copy link
Member

mvllow commented Apr 9, 2024

It looks like Neovide might handle this via neovide/neovide#2471

After re-reading the initial issue you linked, though, I realised that we are using the blend property but never intended it to actually blend via Neovim's API—we take the blend value and apply our own logic to have a colour that looks blended. In short, adding blend = 1 or blend = 0 (not able to test at the moment) to the groups mentioned above may fix this.

@mizlan
Copy link
Author

mizlan commented May 5, 2024

I don't think either works

@shivajreddy
Copy link

Yup, transparency = true is not working. other themes do have working transparency

@mvllow
Copy link
Member

mvllow commented Jun 7, 2024

@shivajreddy that sounds like another issue since this issue is about false not working. What are you seeing to say true is also not working?

@shivajreddy
Copy link

shivajreddy commented Jun 20, 2024

@mvllow Setting the transparency to true does nothing, I checked with catppuccin theme and transparency works with my current terminal config, but if I use rose pine theme the transparency is always off.

` {
"rose-pine/neovim",
lazy = false,
name = "rose-pine",
variant = "main", -- auto, main, moon, or dawn

dark_variant = "main", -- main, moon, or dawn
dim_inactive_windows = false,
extend_background_behind_borders = true,

enable = {
  terminal = true,
  legacy_highlights = true,
  migrations = true, -- Handle deprecated options automatically
},

styles = {
  bold = true,
  italic = false,
  transparency = true,
},

groups = {
  border = "muted",
  link = "iris",
  panel = "surface",

  error = "love",
  hint = "iris",
  info = "foam",
  note = "pine",
  todo = "rose",
  warn = "gold",

  git_add = "foam",
  git_change = "rose",
  git_delete = "love",
  git_dirty = "rose",
  git_ignore = "muted",
  git_merge = "iris",
  git_rename = "pine",
  git_stage = "iris",
  git_text = "rose",
  git_untracked = "subtle",

  h1 = "iris",
  h2 = "foam",
  h3 = "rose",
  h4 = "gold",
  h5 = "pine",
  h6 = "foam",
},

highlight_groups = {
  Comment = { fg = "foam" },
  VertSplit = { fg = "muted", bg = "muted" },
  GitSignsAdd = { fg = "#bacfc4", inherit = false },
  GitSignsChange = { fg = "#e6d2c1", inherit = false },
  GitSignsDelete = { fg = "#dbb6b4", inherit = false },
},

},

-- Configure LazyVim to load the colorscheme
{
"LazyVim/LazyVim",
opts = {
colorscheme = "rose-pine",
-- colorscheme = "catppuccin",
},
},
`

@bhuvneshuchiha
Copy link

Did anyone face issue that with disable_background set to true, it still gives the rose-pine theme background to nvim-treesitter-context

@sjclayton
Copy link
Contributor

sjclayton commented Jul 21, 2024

@bhuvneshuchiha

I can confirm this on my end.

Will be fixed by #294. 😄

@sjclayton
Copy link
Contributor

@shivajreddy

Transparency is working just fine on my end... Can you try something for me?

Set extend_background_behind_borders = false while you have transparency on and let me know what happens.

@bhuvneshuchiha
Copy link

@bhuvneshuchiha

I can confirm this on my end.

Will be fixed by #294. 😄

#294 -- Please check this out mate

@bhuvneshuchiha
Copy link

Have added a follow up here #294

@mvllow
Copy link
Member

mvllow commented Jul 24, 2024

I believe this is resolved :)

@mvllow mvllow closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants