Giter VIP home page Giter VIP logo

Comments (17)

dot-1q avatar dot-1q commented on August 19, 2024 1

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!

from gruvbox-material.nvim.

f4z3r avatar f4z3r commented on August 19, 2024

@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)?

from gruvbox-material.nvim.

Parilia avatar Parilia commented on August 19, 2024

Background in general
Screenshot_20240401_141257

from gruvbox-material.nvim.

f4z3r avatar f4z3r commented on August 19, 2024

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.

from gruvbox-material.nvim.

Parilia avatar Parilia commented on August 19, 2024

alright, cool thank you for the fix. if I can I would like to help where I can

from gruvbox-material.nvim.

f4z3r avatar f4z3r commented on August 19, 2024

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 👍🏽

from gruvbox-material.nvim.

dot-1q avatar dot-1q commented on August 19, 2024

@f4z3r
I'm now starting to see this issue again after the code refactor.
Screenshot 2024-05-11 at 18 21 14

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
      },
    },
  },
}

from gruvbox-material.nvim.

Parilia avatar Parilia commented on August 19, 2024

I have no issues with the dark theme

from gruvbox-material.nvim.

f4z3r avatar f4z3r commented on August 19, 2024

@dot-1q if you are talking about the floating window having a background, you need to set the float.force_background to false.

from gruvbox-material.nvim.

dot-1q avatar dot-1q commented on August 19, 2024

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
      },
    },
  },
}

from gruvbox-material.nvim.

f4z3r avatar f4z3r commented on August 19, 2024

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?

from gruvbox-material.nvim.

dot-1q avatar dot-1q commented on August 19, 2024

I get this:
Screenshot 2024-05-11 at 22 02 52
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.
Screenshot 2024-05-11 at 22 03 41

from gruvbox-material.nvim.

f4z3r avatar f4z3r commented on August 19, 2024

Mhhh this is very strange. No matter if I set the background to light or dark it seems to work for me:

image

with config:

require("gruvbox-material").setup({
  background = {
    transparent = true,
  },
  float = {
    force_background = true,
  },
})

and:

image

with configuration:

require("gruvbox-material").setup({
  background = {
    transparent = true,
  },
  float = {
    force_background = false,
  },
})

Do you override NormalFloat somewhere?

from gruvbox-material.nvim.

dot-1q avatar dot-1q commented on August 19, 2024

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:
Screenshot 2024-05-12 at 18 40 24

Seems like its being called more than once and overriding my options. I don't know if this is of any help.

from gruvbox-material.nvim.

f4z3r avatar f4z3r commented on August 19, 2024

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.

from gruvbox-material.nvim.

Parilia avatar Parilia commented on August 19, 2024

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.

from gruvbox-material.nvim.

f4z3r avatar f4z3r commented on August 19, 2024

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,
  },
}

from gruvbox-material.nvim.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.