murtaza-u / gruvqueen

Port of famous gruvbox theme in lua(inspired by gruvbox-material)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix: reload required after changing config values

qbedard opened this issue · comments

Right now, changing any of the configuration values seems to have no effect, even after resetting colorscheme gruvqueen. This means that changing any of the values requires setting them in the config, closing, and reopening Neovim.

The fix doesn't seem to resolve the issue. Digging in a little, changing vim.g.gruvqueen_style doesn't end up changing the config table. You might just need to grab them from vim.g when you need them to get this to work. Looks like that's what some other Lua colorschemes are doing. You could just call your opt() function where you need the setting rather than grabbing and storing it when require("gruvqueen.config") is called the first time. Might be another way to have a dynamic table element (a "property" if you will), but that's not a Lua pattern I know yet if possible.

2021-08-03-@10-08-55

Calling vim.cmd("colorscheme gruvqueen") after all the user specific configuration solves the issue for me.
Can you give a scenario when it is not working for you @timbedard

I think the issue arises when you try to change the palette right? Changing the palette doesn't reflect on the colorscheme right?

I think the issue arises when you try to change the palette right? Changing the palette doesn't reflect on the colorscheme right?

That's correct. I'm changing vim.g.gruvqueen_style specifically.

@timbedard I have defined a new method to modify the highlights. Now you can directly hand in a lua table containing your customisations, no need to require the components you need to change. Please checkout the README.

@timbedard I have defined a new method to modify the highlights. Now you can directly hand in a lua table containing your customisations, no need to require the components you need to change. Please checkout the README.

That's pretty neat.