I've been working on a plugin that lets you customize your color scheme based on the color values you provide. I've been stuck on a bug for two days now and was wondering if anyone has run into this issue
In my setup function I declare vim.g.black_3 = black_3
generate-colors.lua
:
local M = {}
M.setup function()
-- Generate colors based on setup config values up here
vim.g.black_3 = black_3
end
return M
I reference that value in my config but it doesn't recognize it
colors-config.lua
:
require("generate-colors").setup({
custom_highlights = {
SignColumn = {bg = "#333333"} -- works
SignColumn = {bg = vim.g.black_3} -- read as empty
}
})
I'm assuming that this is because the vim.g variables only exist after the setup function is called, I've tried returning the values from setup, and declaring vim.g variables after the setup function but no luck.