142 lines
2.8 KiB
Nix
142 lines
2.8 KiB
Nix
{
|
|
programs.nixvim = {
|
|
globals = {
|
|
mapleader = " ";
|
|
maplocalleader = " ";
|
|
};
|
|
keymaps = [
|
|
{
|
|
mode = [
|
|
"n"
|
|
"s"
|
|
"x"
|
|
"v"
|
|
];
|
|
key = "<Space>";
|
|
action = "<Nop>";
|
|
options.silent = true;
|
|
}
|
|
{
|
|
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;
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<Tab>";
|
|
action = "<CMD>bnext<CR>";
|
|
options = {
|
|
desc = "Next Buffer";
|
|
silent = true;
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<S-Tab>";
|
|
action = "<CMD>bprevious<CR>";
|
|
options = {
|
|
desc = "Previous Buffer";
|
|
silent = true;
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>c";
|
|
action = "<CMD>%y+<CR>";
|
|
options = {
|
|
desc = "Copy Buffer to Clipboard";
|
|
silent = true;
|
|
};
|
|
}
|
|
{
|
|
mode = [
|
|
"v"
|
|
"x"
|
|
"s"
|
|
];
|
|
key = "<leader>c";
|
|
action = "<CMD>\"+y<CR>";
|
|
options = {
|
|
desc = "Copy Selection to Clipboard";
|
|
silent = true;
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>w";
|
|
action = "<CMD>w<CR>";
|
|
options = {
|
|
desc = "Save Buffer to File";
|
|
silent = false;
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>q";
|
|
action = "<CMD>bd<CR>";
|
|
options = {
|
|
desc = "Close Buffer";
|
|
silent = false;
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>Q";
|
|
action = "<CMD>bd!<CR>";
|
|
options = {
|
|
desc = "Force Close Buffer";
|
|
silent = false;
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>`";
|
|
action = "<CMD>qa<CR>";
|
|
options = {
|
|
desc = "Quit All";
|
|
silent = false;
|
|
};
|
|
}
|
|
{
|
|
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;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|