mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-15 18:05:59 +01:00
53 lines
927 B
Nix
53 lines
927 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
|
|
cfg = config.vim;
|
|
in {
|
|
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;
|
|
};
|
|
};
|
|
|
|
insert = mkIf cfg.disableArrows {
|
|
"<up>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<down>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<left>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<right>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|