mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
40 lines
769 B
Nix
40 lines
769 B
Nix
lib:
|
|
let
|
|
inherit (lib) mapAttrs' nameValuePair;
|
|
inherit (lib.nixvim) ifNonNull';
|
|
basePathAnd = lib.concat [
|
|
"plugins"
|
|
"rainbow-delimiters"
|
|
];
|
|
in
|
|
{
|
|
deprecateExtraOptions = true;
|
|
|
|
optionsRenamedToSettings = map (lib.splitString ".") [
|
|
"highlight"
|
|
"whitelist"
|
|
"blacklist"
|
|
"log.file"
|
|
"log.level"
|
|
];
|
|
|
|
imports = [
|
|
(
|
|
let
|
|
oldOptPath = basePathAnd [ "query" ];
|
|
in
|
|
lib.mkChangedOptionModule oldOptPath
|
|
(basePathAnd [
|
|
"settings"
|
|
"query"
|
|
])
|
|
(
|
|
config:
|
|
let
|
|
old = lib.getAttrFromPath oldOptPath config;
|
|
in
|
|
ifNonNull' old (mapAttrs' (n: nameValuePair (if n == "default" then "" else n)) old)
|
|
)
|
|
)
|
|
];
|
|
}
|