rose-pine / neovim

Soho vibes for Neovim
MIT License
2.21k stars 144 forks source link

Hot reload lualine theme when variant changes #14

Closed VergeDX closed 3 years ago

VergeDX commented 3 years ago

Hi, I am a user of macOS. My system support auto light & dark mode switch. So I'm writing a script to match the system theme, by using the vim command: :lua require('rose-pine.functions').select_variant('dawn') at running time.

But I noticed that command will only change the theme of the editor, the lualine theme still keeps the original...

I'm a noob of vim and Lua, I think I do not refresh the lualine theme correctly. Could you please give me some advice...? Thank you very much : )

mvllow commented 3 years ago

Hot reloading works in this fork of lualine: https://github.com/shadmansaleh/lualine.nvim 😌

Hope that helps!

VergeDX commented 3 years ago

Thanks for your patient. I also found this fork : )

The way I switch between is using neovim's signal handler, not running the command directly in neovim. Directly running the command to switch theme at inner neovim is works fine, but shows this bug in neovim's signal handler.

The issue I meet seems caused by neovim itself, not your perfect theme or lualine : )