rktjmp / lush.nvim

Create Neovim themes with real-time feedback, export anywhere.
MIT License
1.45k stars 47 forks source link

Lushify hot reload did not apply message #3

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi,

I just started to play with lush.nvim. Sounds very interesting.

When I change the HSL numbers, I observe that the colors change but I get the following message: Lushify hot reload did not apply: /home/oponkork/.loca...s/lush_tutorial.lua:52: unexpected symbol near ','

Just wanted to let you know. :)

rktjmp commented 3 years ago

Lush.ify will attempt to parse your changes every time the buffer updates (so each keystroke), so basically it will error until the line is complete.

Eg:

hsl(100, 50, 5 -- error
hsl(100, 50, 50 -- error
hsl(100, 50, 50) -- Lua OK!

You also see this if you use vims C-a/C-x increment/decrement keys because that seems to delete from the buffer, then write to the buffer in two steps, so there's stage where there's no value present in the hsl call.

I'm working on ideas for better error reporting, right now as you see it just spits out anything it can, in case you actually have a bug.

ghost commented 3 years ago

You also see this if you use vims C-a/C-x increment/decrement keys because that seems to delete from the buffer, then write to the buffer in two steps, so there's stage where there's no value present in the hsl call.

Ahaa!! I was not aware of this. Learnt something new today.

I'm working on ideas for better error reporting, right now as you see it just spits out anything it can, in case you actually have a bug.

Yes that would be helpful.