mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-27 15:36:46 +00:00
b71bf75dcd
* 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
35 lines
574 B
Nix
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;
|
|
};
|
|
};
|
|
};
|
|
}
|