mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-30 08:36:46 +00:00
treewide: remove the theme section from the DAG order dependance
This commit is contained in:
parent
c757d28ff7
commit
ed9691f35d
3 changed files with 5 additions and 5 deletions
|
@ -11,7 +11,7 @@ entries in nvf:
|
||||||
inserted before the rest of the DAG
|
inserted before the rest of the DAG
|
||||||
2. `globalsScript` - used to set globals defined in `vim.globals`
|
2. `globalsScript` - used to set globals defined in `vim.globals`
|
||||||
3. `basic` - used to set basic configuration options
|
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 between `basic` and `pluginConfigs`, so 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,
|
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
|
see the [Custom Plugins](/index.xhtml#ch-custom-plugins) page for adding your own
|
||||||
plugins) DAG, used to set up internal plugins
|
plugins) DAG, used to set up internal plugins
|
||||||
|
|
|
@ -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) entryAfter;
|
inherit (lib.nvim.dag) entryBefore;
|
||||||
|
|
||||||
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 = entryAfter ["basic"] ''
|
luaConfigRC.theme = entryBefore ["pluginConfigs"] ''
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
${supportedThemes.${cfg.name}.setup {inherit (cfg) style transparent;}}
|
${supportedThemes.${cfg.name}.setup {inherit (cfg) style transparent;}}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -133,8 +133,8 @@ in {
|
||||||
vim = {
|
vim = {
|
||||||
luaConfigRC = {
|
luaConfigRC = {
|
||||||
globalsScript = entryAnywhere (concatLines globalsScript);
|
globalsScript = entryAnywhere (concatLines globalsScript);
|
||||||
# basic, theme
|
# basic
|
||||||
pluginConfigs = entryAfter ["theme"] pluginConfigs;
|
pluginConfigs = entryAfter ["basic"] pluginConfigs;
|
||||||
extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs;
|
extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs;
|
||||||
mappings = entryAfter ["extraPluginConfigs"] mappings;
|
mappings = entryAfter ["extraPluginConfigs"] mappings;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue