Closed Parilia closed 6 months ago
@Parilia can be you please provide an example screenshot that showcases the issue? Does this issue apply to the background generally, or only to specific parts (such as the sign column)?
Background in general
Hi @Parilia , I implemented a small fix for it. I will merge this later today.
Please note that this plugin will not support all the options you have defined above in your config. Feel free to open issues for them if you really want them in this repo.
On a side note: I took over this repo only a few weeks back. I am planning on updating the code a little so that it is easier to add future fixes and potential additions. This will also include a more "lua-oriented" configuration where values are provided directly to the setup
function instead of globally defined variables.
alright, cool thank you for the fix. if I can I would like to help where I can
alright, cool thank you for the fix. if I can I would like to help where I can
Thanks. I will try to setup some issues on the project to track a bit what I think makes sense (and add info to the milestone). If you want to help, feel free to grab something or submit a PR 👍🏽
@f4z3r I'm now starting to see this issue again after the code refactor.
My config:
return {
{
'f4z3r/gruvbox-material.nvim',
enabled = true,
lazy = false,
priority = 1000,
opts = {
background = {
transparent = true, -- set the background to transparent
},
float = {
force_background = true, -- force background on floats even when background.transparent is set
background_color = nil, -- set color for float backgrounds. If nil, uses the default color set
-- by the color scheme
},
},
},
}
I have no issues with the dark theme
@dot-1q if you are talking about the floating window having a background, you need to set the float.force_background
to false
.
The issue still stands. Changing the transparency (background or float) in the options has no effect on the final transparency value for me.
return {
{
'f4z3r/gruvbox-material.nvim',
enabled = true,
lazy = false,
priority = 1000,
opts = {
background = {
transparent = true, -- set the background to transparent
},
float = {
force_background = false, -- force background on floats even when background.transparent is set
background_color = nil, -- set color for float backgrounds. If nil, uses the default color set
-- by the color scheme
},
},
},
}
Mhhh ok, I will try to have a look at it tomorrow. When you go into the floating window and enter :Inspect
, what do you get?
I get this:
While on this, changing Italics to false doesn't disable italics. I wonder if this is something related to reading the user configs. As you can see, I disabled Italics but in the screenshot they're enabled.
Mhhh this is very strange. No matter if I set the background to light
or dark
it seems to work for me:
with config:
require("gruvbox-material").setup({
background = {
transparent = true,
},
float = {
force_background = true,
},
})
and:
with configuration:
require("gruvbox-material").setup({
background = {
transparent = true,
},
float = {
force_background = false,
},
})
Do you override NormalFloat
somewhere?
I do not, at least that I'm aware of. But more than that, I'm not able to configure any of the colorscheme options. I'm using lazynvim, and the plugin file is:
return {
{
'f4z3r/gruvbox-material.nvim',
name = 'gruvbox-material',
lazy = false,
priority = 1000,
config = function()
require('gruvbox-material').setup {
italics = false, -- enable italics in general
contrast = 'medium', -- set contrast, can be any of "hard", "medium", "soft"
comments = {
italics = false, -- enable italic comments
},
background = {
transparent = true, -- set the background to transparent
},
float = {
force_background = false, -- force background on floats even when background.transparent is set
background_color = nil, -- set color for float backgrounds. If nil, uses the default color set
-- by the color scheme
},
}
end,
},
}
I've tried through the opts = {}
way, and replacing config
with init
to no avail.
After this line I've added:
print(vim.print(cfg))
print("-----------")
And this is the result:
Seems like its being called more than once and overriding my options. I don't know if this is of any help.
Puh, seems to be an "issue" with lazy-nvim. I have no experience with it. Maybe @Parilia can help? He uses lazy-nvim as far as I know.
My configs are in my init.lua and are:
{
'f4z3r/gruvbox-material.nvim',
name = 'gruvbox-material',
lazy = false,
priority = 1000,
opts = {
italics = false,
comments = { italics = false },
background = { transparent = true },
float = {
force_background = false,
background_color = nil,
},
},
}
Could it perhaps have something to do with your terminal ? If i set my terminal to not be transparent then none of neovim is.
Ah, I think I know what the problem is. @dot-1q you use auto-dark-mode right? Do you configure it with:
return {
"f-person/auto-dark-mode.nvim",
config = {
update_interval = 1000,
set_dark_mode = function()
vim.api.nvim_set_option("background", "dark")
vim.cmd("colorscheme gruvbox-material")
end,
set_light_mode = function()
vim.api.nvim_set_option("background", "light")
vim.cmd("colorscheme gruvbox-material")
end,
},
}
If you do, every call to colorscheme gruvbox-material
will call the setup function with default arguments. What you want to do instead is to call require("gruvbox-material").setup(...)
in the callbacks. So have:
return {
"f-person/auto-dark-mode.nvim",
config = {
update_interval = 1000,
set_dark_mode = function()
vim.api.nvim_set_option("background", "dark")
require("gruvbox-material").setup({ your opts})
end,
set_light_mode = function()
vim.api.nvim_set_option("background", "light")
require("gruvbox-material").setup({ your opts})
end,
},
}
That actually solves my problem yes! Thank you very much!
Although it is strange indeed, since while i was testing i remember disabling that plugin via enabled=false
, so i'm not sure why loading the color scheme again explicitly solves the issue.
Thanks for debugging my setup!
Backgroundtransparency does not seem to work
Is set and doesnt seem to work