neovim-flake/modules/neovim/mappings/config.nix
diniamo b71bf75dcd
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-12 00:07:45 +00:00

34 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;
};
};
};
}