mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
modules/keymap: improve lua
deprecation
- Replace nullable lua option with a no-default option. - Made it so the deprecated option is only declared when `lua = true` is passed. - Replace `normalizeMappings` with a `removeDeprecatedMapAttrs` helper. - Added warnings for all options that historically had `lua` support.
This commit is contained in:
parent
c52ba67856
commit
7fb1f9dd9d
6 changed files with 115 additions and 104 deletions
|
@ -193,12 +193,17 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
|||
extraOptions = {
|
||||
keymaps = mapAttrs (
|
||||
optionName: funcName:
|
||||
helpers.mkNullOrOption (helpers.keymaps.mkMapOptionSubmodule {
|
||||
defaults = {
|
||||
mode = "n";
|
||||
action = "<Cmd>Buffer${funcName}<CR>";
|
||||
helpers.mkNullOrOption' {
|
||||
type = helpers.keymaps.mkMapOptionSubmodule {
|
||||
defaults = {
|
||||
mode = "n";
|
||||
action = "<Cmd>Buffer${funcName}<CR>";
|
||||
};
|
||||
lua = true;
|
||||
};
|
||||
}) "Keymap for function Buffer${funcName}"
|
||||
apply = v: if v == null then null else helpers.keymaps.removeDeprecatedMapAttrs v;
|
||||
description = "Keymap for function Buffer${funcName}";
|
||||
}
|
||||
) keymapsActions;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue