rktjmp / lush.nvim

Create Neovim themes with real-time feedback, export anywhere.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`:Lushify` doesn't work with `lush.extends()`

musjj opened this issue · comments

commented
local colors = require("theme.colors")
local theme = require("theme.theme")
---@diagnostic disable: undefined-global
local custom = lush.extends({ theme }).with(
  function()
    return {
      HighlightA { fg = colors.blue, bold = true },
      HighlightB { fg = colors.light_grey },
    }
  end
)
---@diagnostic enable: undefined-global

return custom

Running :Lushify on this buffer yields this error:
Lush.ify: Could not parse buffer due to Lua error: ...ata\site\pack\packer\opt\lush.nvim/lua/lush/compiler.lua:90: bad argument #1 to 'pairs' (table expected, got nil)

The highlight symbols are styled correctly, but the actual target highlights are not getting modified.

Also, the theme is functioning just fine if I pass the parsed spec to lush()

commented

Never mind, there was a line in my config that is causing the code to return early...

😅 phew