flake/nixos/nvim/keymaps.nix

116 lines
2.2 KiB
Nix
Raw Normal View History

2025-02-02 18:53:01 -06:00
{
programs.nixvim = {
2025-02-04 08:26:49 -06:00
globals = {
mapleader = " ";
maplocalleader = " ";
};
2025-02-02 18:53:01 -06:00
keymaps = [
{
mode = "n"; # Normal mode
key = "<Space>";
action = "<Nop>";
options.silent = true;
}
2025-02-04 08:26:49 -06:00
{
mode = "n";
key = "<A-Left>";
action = "<C-w>h";
options = {
desc = "Move Left";
silent = true;
};
}
{
mode = "n";
key = "<A-Down>";
action = "<C-w>j";
options = {
desc = "Move Down";
silent = true;
};
}
{
mode = "n";
key = "<A-Up>";
action = "<C-w>k";
options = {
desc = "Move Up";
silent = true;
};
}
{
mode = "n";
key = "<A-Right>";
action = "<C-w>l";
options = {
desc = "Move Right";
silent = true;
};
}
2025-02-02 18:53:01 -06:00
{
mode = "n";
key = "<Tab>";
action = ":bnext<CR>";
options = {
desc = "Next Buffer";
silent = true;
};
}
{
mode = "n";
key = "<S-Tab>";
action = ":bprevious<CR>";
options = {
desc = "Previous Buffer";
silent = true;
};
}
{
mode = "n";
key = "<leader>w";
action = ":w<CR>";
options = {
desc = "Save Buffer to File";
2025-02-04 08:26:49 -06:00
silent = false;
2025-02-02 18:53:01 -06:00
};
}
{
mode = "n";
key = "<leader>q";
2025-02-04 08:26:49 -06:00
action = ":bd<CR>";
options = {
desc = "Close Buffer";
silent = false;
};
}
{
mode = "n";
key = "<leader>Q";
action = ":bd!<CR>";
options = {
desc = "Force Close Buffer";
silent = false;
};
}
{
mode = "n";
key = "<leader>`";
2025-02-02 18:53:01 -06:00
action = ":qa<CR>";
options = {
desc = "Quit All";
silent = false;
};
}
2025-02-04 08:26:49 -06:00
{
mode = "t";
key = "<C-Esc>";
action = "<C-\\><C-n>";
options = {
desc = "Exit Terminal Mode"; # why does Neovim not have this by default??? wtf???
silent = true;
};
}
2025-02-02 18:53:01 -06:00
];
};
}