2024-04-07 14:16:08 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
|
|
|
|
cfg = config.vim;
|
|
|
|
in {
|
2024-04-20 15:09:39 +00:00
|
|
|
config = {
|
|
|
|
vim.maps = {
|
|
|
|
normal =
|
|
|
|
mkIf cfg.disableArrows {
|
|
|
|
"<up>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<down>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<left>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<right>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// mkIf cfg.mapLeaderSpace {
|
|
|
|
"<space>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
insert = mkIf cfg.disableArrows {
|
2024-04-07 15:31:06 +00:00
|
|
|
"<up>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<down>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<left>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
|
|
|
"<right>" = {
|
|
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
|
|
};
|
2024-04-07 14:16:08 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|