diff --git a/docs/release-notes/rl-0.4.adoc b/docs/release-notes/rl-0.4.adoc index f13350f..c3e7b80 100644 --- a/docs/release-notes/rl-0.4.adoc +++ b/docs/release-notes/rl-0.4.adoc @@ -16,6 +16,8 @@ https://github.com/n3oney[n3oney]: * Moved default keybinds into keybinds section of each module +* Simplified luaConfigRC and configRC setting - they can now just take strings + https://github.com/horriblename[horriblename]: * Added `clangd` as alternative lsp for C/++. diff --git a/modules/core/default.nix b/modules/core/default.nix index 91cccf5..244965b 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -132,13 +132,13 @@ in { configRC = mkOption { description = "vimrc contents"; - type = nvim.types.dagOf types.lines; + type = types.oneOf [(nvim.types.dagOf types.lines) types.str]; default = {}; }; luaConfigRC = mkOption { description = "vim lua config"; - type = nvim.types.dagOf types.lines; + type = types.oneOf [(nvim.types.dagOf types.lines) types.str]; default = {}; }; @@ -282,7 +282,12 @@ in { dag, mapResult, }: let - sortedDag = nvim.dag.topoSort dag; + finalDag = lib.mapAttrs (name: value: + if builtins.isString value + then nvim.dag.entryAnywhere value + else value) + dag; + sortedDag = nvim.dag.topoSort finalDag; result = if sortedDag ? result then mapResult sortedDag.result