f4z3r / gruvbox-material.nvim

Material Gruvbox colorscheme for Neovim written in Lua
MIT License
32 stars 4 forks source link

Initial configuration #13

Closed dot-1q closed 3 months ago

dot-1q commented 3 months ago

Hi @f4z3r,

I use auto-dark-mode to change my neovim background to dark or light depending on my machine settings. This behavior was not being reflected within the gruvbox-material palette. The palette would be calculated only at the initial loading stage of the plugin and not anymore. Commenting these lines out: https://github.com/f4z3r/gruvbox-material.nvim/blob/9143e172617e708d6588f424772ef20340877dd9/lua/gruvbox-material/init.lua#L26-L30 And: https://github.com/f4z3r/gruvbox-material.nvim/blob/9143e172617e708d6588f424772ef20340877dd9/lua/gruvbox-material/init.lua#L38

Solves the issue. Changing the background manually or via the auto-dark-mode plugin, effectively changes the color palette as expected. Is there a reason on why this check exists? Or can it be safely removed?

f4z3r commented 3 months ago

Hi @dot-1q , thanks for submitting this issue. I took over the repo from someone else and thus I can't tell you off the top of my head why the check exists. I will have a look at it tomorrow to have it working 👍🏽

f4z3r commented 3 months ago

I tested your proposed changes, and it does dynamically update the theme by just setting set background=light and back. I am a bit unsure about the unloading of the package itself, but as far as I could tell, there was no additional calls to the setup that were unnecessarily triggered 👍🏽

Thanks for submitting the issue and the proposed changes 💯

Fix is released in version 0.1.4