mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
feat: make it possible to use strings for the RC
when providing a string, it will get mapped as if it was given with nivm.dag.entryAnywhere, which will most likely be what people want
This commit is contained in:
parent
bc26d437d1
commit
c8ea2f0f8e
2 changed files with 10 additions and 3 deletions
|
@ -16,6 +16,8 @@ https://github.com/n3oney[n3oney]:
|
||||||
|
|
||||||
* Moved default keybinds into keybinds section of each module
|
* 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]:
|
https://github.com/horriblename[horriblename]:
|
||||||
|
|
||||||
* Added `clangd` as alternative lsp for C/++.
|
* Added `clangd` as alternative lsp for C/++.
|
||||||
|
|
|
@ -132,13 +132,13 @@ in {
|
||||||
|
|
||||||
configRC = mkOption {
|
configRC = mkOption {
|
||||||
description = "vimrc contents";
|
description = "vimrc contents";
|
||||||
type = nvim.types.dagOf types.lines;
|
type = types.oneOf [(nvim.types.dagOf types.lines) types.str];
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
luaConfigRC = mkOption {
|
luaConfigRC = mkOption {
|
||||||
description = "vim lua config";
|
description = "vim lua config";
|
||||||
type = nvim.types.dagOf types.lines;
|
type = types.oneOf [(nvim.types.dagOf types.lines) types.str];
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -282,7 +282,12 @@ in {
|
||||||
dag,
|
dag,
|
||||||
mapResult,
|
mapResult,
|
||||||
}: let
|
}: 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 =
|
result =
|
||||||
if sortedDag ? result
|
if sortedDag ? result
|
||||||
then mapResult sortedDag.result
|
then mapResult sortedDag.result
|
||||||
|
|
Loading…
Reference in a new issue