nixvim/plugins/lush-nvim: properly apply the Lush spec

This commit is contained in:
Gabriel Arazas 2024-02-09 17:35:43 +08:00
parent 249edc0508
commit f00ff0f06f
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -40,14 +40,20 @@ let
${cfg.extraConfigLua}
${theme.extraConfigLua}
local theme = lush(
function(injected_functions)
local sym = injected_functions.sym
return { ${lib.concatStringsSep "," highlightList} }
end
)
vim.g.colors_name = '${name}'
vim.o.termguicolors = true
return theme
-- This needs to be parsed twice: once to generate the Lush spec
-- and the other to actually apply the spec.
--
-- @diagnostic disable: undefined-global
local spec = lush(function(injected_functions)
local sym = injected_functions.sym
return { ${lib.concatStringsSep "," highlightList} }
end)
-- We then apply the theme.
lush(spec)
'';
in
{