2024-04-20 23:10:06 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
|
|
|
|
cfg = config.vim;
|
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
vim.maps = {
|
2024-07-20 08:30:48 +00:00
|
|
|
normal = mkIf cfg.disableArrows {
|
|
|
|
"<up>" = {
|
|
|
|
action = "<nop>";
|
2024-04-20 23:10:06 +00:00
|
|
|
|
2024-07-20 08:30:48 +00:00
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<down>" = {
|
|
|
|
action = "<nop>";
|
2024-04-20 23:10:06 +00:00
|
|
|
|
2024-07-20 08:30:48 +00:00
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<left>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<right>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
2024-04-20 23:10:06 +00:00
|
|
|
};
|
2024-07-20 08:30:48 +00:00
|
|
|
};
|
2024-04-20 23:10:06 +00:00
|
|
|
|
|
|
|
insert = mkIf cfg.disableArrows {
|
|
|
|
"<up>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<down>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<left>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<right>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|