RedsXDD / neopywal.nvim

🎨 Apply your pywal/wallust colorscheme to Neovim automatically.
MIT License
18 stars 1 forks source link

Are colors supposed to auto update whenever the theme is changed? #25

Closed mewoocat closed 2 months ago

mewoocat commented 2 months ago

I noticed that the readme says

"a Neovim colorscheme plugin that automatically fetches and applies the colors that are auto generated by Pywal."

I assume this means that the plugin watches for changes in ~/.cache/wallust/colors_neopywal.vim/~/.cache/wal/colors-wal.vim and automatically reapply the theme with the updates colors. However, I have to manually run :coloscheme neopywal each time I change my colorscheme. I was wondering if this was the intended behavior or not.

RedsXDD commented 2 months ago

Actually i am not sure if such thing would even be possible in the first place. By "automatically fetches" what i meant was "you change your pywal theme, neopywal theme is updated", but that would still require you to either close and reopen neovim or run :colorscheme neopywal.

Despite saying that, maybe there's a way to detect changes on those files that i am not aware of. It would be a neat feature to have if it's actually possible so i may take a look at that in the future, but i won't promise anything.

RedsXDD commented 2 months ago

Update: Never mind turns out doing such thing was extremely easy to implement. Expect that feature to be available on v2.5.0 :) (unless i find some critical bug with my implementation cannot be fixed, which is unlikely).

mewoocat commented 2 months ago

In the meantime I got it working with fwatch.

    -- Use fwatch to watch for changes in wallust theme
    local fwatch = require('fwatch')
    fwatch.watch(vim.env.HOME .. "/.cache/wallust/colors_neopywal.vim", "colorscheme neopywal")