mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lib/deprecation: expose mkSettingsRenamedOptionModules
publicly
Extracted the `optionsRenamedToSettings` implementation from`mkVimPlugin` and `mkNeovimPlugin` into a new public helper.
This commit is contained in:
parent
e3ec1c4a46
commit
db4c4e5b17
4 changed files with 20 additions and 19 deletions
|
@ -46,6 +46,18 @@ rec {
|
|||
'';
|
||||
};
|
||||
|
||||
mkSettingsRenamedOptionModules =
|
||||
oldPrefix: newPrefix:
|
||||
map (
|
||||
option':
|
||||
let
|
||||
option = toList option';
|
||||
oldPath = oldPrefix ++ option;
|
||||
newPath = newPrefix ++ map nixvim.toSnakeCase option;
|
||||
in
|
||||
mkRenamedOptionModule oldPath newPath
|
||||
);
|
||||
|
||||
# A clone of types.coercedTo, but it prints a warning when oldType is used.
|
||||
transitionType =
|
||||
oldType: coerceFn: newType:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue