2024-04-21 01:10:06 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
|
|
|
|
cfg = config.vim;
|
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
vim.maps = {
|
2024-07-13 17:02:45 +02:00
|
|
|
normal = mkIf cfg.disableArrows {
|
|
|
|
"<up>" = {
|
|
|
|
action = "<nop>";
|
2024-04-21 01:10:06 +02:00
|
|
|
|
2024-07-13 17:02:45 +02:00
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<down>" = {
|
|
|
|
action = "<nop>";
|
2024-04-21 01:10:06 +02:00
|
|
|
|
2024-07-13 17:02:45 +02:00
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<left>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<right>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
2024-04-21 01:10:06 +02:00
|
|
|
};
|
2024-07-13 17:02:45 +02:00
|
|
|
};
|
2024-04-21 01:10:06 +02: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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|