Skip to content

:Lushify error: Could not parse buffer due to Lua error #100

Description

@ramojus

Minimal example of what I'm working with:
./lua/my_theme/init.lua:

local M = {}

M.get_theme = function()
    local lush = require 'lush'
    local hsl = lush.hsl

    local bg = hsl(24, 10, 10)
    local fg = bg.li(80)

    local theme = lush(function()
        return {
            Normal       { bg = bg, fg = fg }, -- Normal text
        }
    end)
    return theme
end

return M

./colors/my_theme.lua:

vim.opt.background = 'dark'
vim.g.colors_name = 'my_theme'

package.loaded['my_theme'] = nil

require('lush')(require('my_theme').get_theme())

Opening ./lua/my_theme/init.lua file and runing :Lushify, throws this error: Lush.ify: Could not parse buffer due to Lua error: ...vim/site/pack/packer/opt/lush.nvim/lua/lush/compiler.lua:91: attempt to index local 'def' (a function value)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions