112 lines
2 KiB
Nix
112 lines
2 KiB
Nix
{
|
|
programs.nixvim.keymaps = [
|
|
{
|
|
mode = [
|
|
"n"
|
|
"v"
|
|
];
|
|
key = "<leader>fc";
|
|
action = "<cmd>lua vim.lsp.buf.format()<cr>";
|
|
options = {
|
|
silent = true;
|
|
desc = "Format Code";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>ch";
|
|
action = "<cmd>noh<CR>";
|
|
options = {
|
|
desc = "Clear Highlighting";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<C-p>";
|
|
action = "<cmd>Telescope live_grep<CR>";
|
|
options = {
|
|
desc = "Telescope LiveGrep";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>fg";
|
|
action = "<cmd>Telescope find_files<CR>";
|
|
options = {
|
|
desc = "Telescope File Search";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<C-n>";
|
|
action = "<Cmd>Neotree toggle<CR>";
|
|
options = {
|
|
desc = "Toggle Neotree";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader><tab><tab>";
|
|
action = "<cmd>tabnew<cr>";
|
|
options = {
|
|
desc = "New Tab";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader><tab>]";
|
|
action = "<cmd>BufferNext<cr>";
|
|
options = {
|
|
desc = "Next Tab";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader><tab>d";
|
|
action = "<cmd>BufferClose<cr>";
|
|
options = {
|
|
desc = "Close Tab";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader><tab>[";
|
|
action = "<cmd>BufferPrevious<cr>";
|
|
options = {
|
|
desc = "Previous Tab";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<c-k>";
|
|
action = ":wincmd k<CR>";
|
|
options = {
|
|
desc = "Go Up";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<c-j>";
|
|
action = ":wincmd j<CR>";
|
|
options = {
|
|
desc = "Go Down";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<c-h>";
|
|
action = ":wincmd h<CR>";
|
|
options = {
|
|
desc = "Go Left";
|
|
};
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<c-l>";
|
|
action = ":wincmd l<CR>";
|
|
options = {
|
|
desc = "Go Right";
|
|
};
|
|
}
|
|
];
|
|
}
|