mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 08:39:50 +01: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
134c60f40e
commit
5c6cd508c3
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
|
||||
|
||||
* Simplified luaConfigRC and configRC setting - they can now just take strings
|
||||
|
||||
https://github.com/horriblename[horriblename]:
|
||||
|
||||
* Added `clangd` as alternative lsp for C/++.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue