Skip to content

Commit

Permalink
treewide: remove the theme section from the DAG order dependance (#369)
Browse files Browse the repository at this point in the history
* treewide: remove the theme section from the DAG order dependance

* docs/dag-entries: correct theme entry note
  • Loading branch information
diniamo authored Sep 5, 2024
1 parent c757d28 commit 67abc51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/manual/configuring/dag-entries.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ entries in nvf:
inserted before the rest of the DAG
2. `globalsScript` - used to set globals defined in `vim.globals`
3. `basic` - used to set basic configuration options
4. `theme` - used to set up the theme, which has to be done before other plugins
4. `theme` (this is simply placed before `pluginConfigs`, meaning that surrounding entries don't depend on it) - used to set up the theme, which has to be done before other plugins
5. `pluginConfigs` - the result of the nested `vim.pluginRC` (internal option,
see the [Custom Plugins](/index.xhtml#ch-custom-plugins) page for adding your own
plugins) DAG, used to set up internal plugins
Expand Down
4 changes: 2 additions & 2 deletions modules/plugins/theme/theme.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
inherit (lib.attrsets) attrNames;
inherit (lib.types) bool lines enum;
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAfter;
inherit (lib.nvim.dag) entryBefore;

cfg = config.vim.theme;
supportedThemes = import ./supported-themes.nix {
Expand Down Expand Up @@ -45,7 +45,7 @@ in {
config = mkIf cfg.enable {
vim = {
startPlugins = [cfg.name];
luaConfigRC.theme = entryAfter ["basic"] ''
luaConfigRC.theme = entryBefore ["pluginConfigs"] ''
${cfg.extraConfig}
${supportedThemes.${cfg.name}.setup {inherit (cfg) style transparent;}}
'';
Expand Down
4 changes: 2 additions & 2 deletions modules/wrapper/rc/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ in {
vim = {
luaConfigRC = {
globalsScript = entryAnywhere (concatLines globalsScript);
# basic, theme
pluginConfigs = entryAfter ["theme"] pluginConfigs;
# basic
pluginConfigs = entryAfter ["basic"] pluginConfigs;
extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs;
mappings = entryAfter ["extraPluginConfigs"] mappings;
};
Expand Down

0 comments on commit 67abc51

Please sign in to comment.