mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-24 20:54:56 +02:00
lib/neovim-plugin: allow configLocation
to be wrapped using mkOrder
This commit is contained in:
parent
c181014422
commit
6a192a8604
4 changed files with 41 additions and 4 deletions
|
@ -58,6 +58,15 @@ in
|
|||
(maybeApply opts)
|
||||
(lib.mkIf enabled)
|
||||
];
|
||||
|
||||
mkConfigAt =
|
||||
loc: def:
|
||||
let
|
||||
isOrder = loc._type or null == "order";
|
||||
withOrder = if isOrder then lib.modules.mkOrder loc.priority else lib.id;
|
||||
loc' = lib.toList (if isOrder then loc.content else loc);
|
||||
in
|
||||
lib.setAttrByPath loc' (withOrder def);
|
||||
}
|
||||
// lib.mapAttrs (
|
||||
name: msg:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue