rktjmp / lush.nvim

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

Lush.ify: Could not parse buffer due to Lua error: #44

Closed rafamadriz closed 3 years ago

rafamadriz commented 3 years ago

Hey thanks for this awesome work. this is the complete output of the error I'm getting:

Lush.ify: Could not parse buffer due to Lua error: 
...vim/site/pack/packer/start/lush.nvim/lua/lush/parser.lua:33: 
Invalid hsl operation: '__lush', valid operations: 
da rotate saturate abs_saturate desaturate abs_desaturate lighten abs_lighten darken sa hue saturation lightness ro abs_sa de abs_de li abs_li abs_da abs_darken

Folder structure for the theme:

neon
├── colors
│   └── neon.vim
└── lua
    └── neon
        └── init.lua

This is where the entire epec for the theme is init.lua and here is the .vim file for the colors folder taken from the lush template neon.vim

More context:

I get the error above when I try to set it as a theme for neovim and also when doing :Lushify in the init.lua, however despite given that errror, it still gives the color and style for almost all the highlight groups of the init.lua file. But it doesn't set the live theme because of the error, Example: 2021-May-14

As I far as I can see, everything is set as explained in the lush template, I don't see where is my error, I would appreciate any help!

rktjmp commented 3 years ago
        Folded {fg = gray, none, style = "italic"},
                           ~~~~

Should be

        Folded {fg = gray, bg = none, style = "italic"},

But actually you can omit bg = none, it's implied.

Folded {fg = gray} === Folded {fg = gray, bg = "NONE", gui = "NONE", sp = "NONE"}

Not explained in the docs, my fault.

Also your style keys should be gui.

Good luck! I will have a think about providing a better error in this case.

rafamadriz commented 3 years ago

Thank you!