mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-13 08:15:10 +00:00
mappings: deprecate vim.maps
This commit is contained in:
parent
36c88a31f6
commit
caef79e398
1 changed files with 13 additions and 3 deletions
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkMerge;
|
||||
inherit (lib.options) mkOption literalMD;
|
||||
inherit (lib.options) mkOption literalMD showFiles;
|
||||
inherit (lib.types) either str listOf attrsOf nullOr submodule;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.lists) flatten;
|
||||
inherit (lib.lists) flatten optional;
|
||||
inherit (lib.trivial) pipe;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.config) mkBool;
|
||||
|
|
@ -63,10 +64,10 @@
|
|||
legacyMapOption = mode:
|
||||
mkOption {
|
||||
description = "Mappings for ${mode} mode";
|
||||
visible = false;
|
||||
type = attrsOf (submodule {
|
||||
options = mapConfigOptions;
|
||||
});
|
||||
default = {};
|
||||
};
|
||||
|
||||
legacyMapModes = {
|
||||
|
|
@ -152,5 +153,14 @@ in {
|
|||
]
|
||||
)
|
||||
];
|
||||
|
||||
# 2026-06-12
|
||||
warnings = mkMerge (mapAttrsToList (
|
||||
name: option:
|
||||
optional
|
||||
option.isDefined
|
||||
"The option `vim.maps.${name}` defined in ${showFiles option.files} is deprecated, please use `vim.keymaps` instead. "
|
||||
)
|
||||
options.vim.maps);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue