plugins/theme: fix fixed theme DAG place

This commit is contained in:
diniamo 2024-07-15 13:07:45 +02:00
parent c3e42d15ec
commit 62c80aa912
2 changed files with 4 additions and 5 deletions

View file

@ -7,7 +7,7 @@
inherit (lib.attrsets) attrNames; inherit (lib.attrsets) attrNames;
inherit (lib.types) bool lines enum; inherit (lib.types) bool lines enum;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryBetween; inherit (lib.nvim.dag) entryAfter;
cfg = config.vim.theme; cfg = config.vim.theme;
supportedThemes = import ./supported-themes.nix { supportedThemes = import ./supported-themes.nix {
@ -45,7 +45,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim = { vim = {
startPlugins = [cfg.name]; startPlugins = [cfg.name];
luaConfigRC.theme = entryBetween ["basic"] ["pluginConfigs"] '' luaConfigRC.theme = entryAfter ["basic"] ''
${cfg.extraConfig} ${cfg.extraConfig}
${supportedThemes.${cfg.name}.setup {inherit (cfg) style transparent;}} ${supportedThemes.${cfg.name}.setup {inherit (cfg) style transparent;}}
''; '';

View file

@ -134,9 +134,8 @@ in {
vim = { vim = {
luaConfigRC = { luaConfigRC = {
globalsScript = concatLines globalsScript; globalsScript = concatLines globalsScript;
# basic comes after globalsScript, # basic, theme
# but it's defined modules/neovim/init/basic.nix pluginConfigs = entryAfter ["theme"] pluginConfigs;
pluginConfigs = entryAfter ["basic"] pluginConfigs;
extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs; extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs;
mappings = entryAfter ["extraPluginConfigs"] mappings; mappings = entryAfter ["extraPluginConfigs"] mappings;
}; };