nvf/modules/neovim/mappings/config.nix
diniamo 2dd1be0b45 vim.maps rewrite (#352)
* feat: rewrite vim.maps

* modules/mappings: enable silent by default

* docs: add entry for vim.maps rewrite

* lib/binds: improve code, adjust functions to new api
2024-08-24 14:35:50 +02:00

35 lines
574 B
Nix

{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim;
in {
config = {
vim.maps = mkIf cfg.disableArrows {
"<up>" = {
mode = ["n" "i"];
action = "<nop>";
noremap = false;
};
"<down>" = {
mode = ["n" "i"];
action = "<nop>";
noremap = false;
};
"<left>" = {
mode = ["n" "i"];
action = "<nop>";
noremap = false;
};
"<right>" = {
mode = ["n" "i"];
action = "<nop>";
noremap = false;
};
};
};
}