86 lines
1.6 KiB
Nix
86 lines
1.6 KiB
Nix
|
{
|
||
|
programs.nixvim.keymaps = [
|
||
|
# Switching buffers
|
||
|
{
|
||
|
mode = [ "n" ];
|
||
|
action = "<C-W>h";
|
||
|
key = "<S-h>";
|
||
|
options = {
|
||
|
silent = true;
|
||
|
};
|
||
|
}
|
||
|
{
|
||
|
mode = [ "n" ];
|
||
|
action = "<C-W>j";
|
||
|
key = "<S-j>";
|
||
|
options = {
|
||
|
silent = true;
|
||
|
};
|
||
|
}
|
||
|
{
|
||
|
mode = [ "n" ];
|
||
|
action = "<C-W>k";
|
||
|
key = "<S-k>";
|
||
|
options = {
|
||
|
silent = true;
|
||
|
};
|
||
|
}
|
||
|
{
|
||
|
mode = [ "n" ];
|
||
|
action = "<C-W>l";
|
||
|
key = "<S-l>";
|
||
|
options = {
|
||
|
silent = true;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
# Toggle nvim-tree
|
||
|
{
|
||
|
mode = [ "n" ];
|
||
|
action = "<cmd>NvimTreeFindFileToggle<CR>";
|
||
|
key = "tt";
|
||
|
options = {
|
||
|
silent = true;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
# Clear search highlighting
|
||
|
{
|
||
|
mode = [ "n" ];
|
||
|
key = "<space><space>";
|
||
|
action = "<cmd>nohlsearch<CR>";
|
||
|
options = { noremap = true; };
|
||
|
}
|
||
|
|
||
|
# Telescope Plugin
|
||
|
{
|
||
|
# find files
|
||
|
mode = [ "n" ];
|
||
|
key = "<Leader>ff";
|
||
|
action = "<cmd>Telescope find_files<CR>";
|
||
|
options = { noremap = true; };
|
||
|
}
|
||
|
{
|
||
|
# live grep
|
||
|
mode = [ "n" ];
|
||
|
key = "<Leader>fg";
|
||
|
action = "<cmd>Telescope live_grep<CR>";
|
||
|
options = { noremap = true; };
|
||
|
}
|
||
|
{
|
||
|
# buffers
|
||
|
mode = [ "n" ];
|
||
|
key = "<Leader>fb";
|
||
|
action = "<cmd>Telescope buffers<CR>";
|
||
|
options = { noremap = true; };
|
||
|
}
|
||
|
{
|
||
|
# help tags
|
||
|
mode = [ "n" ];
|
||
|
key = "<Leader>fh";
|
||
|
action = "<cmd>Telescope help_tags<CR>";
|
||
|
options = { noremap = true; };
|
||
|
}
|
||
|
];
|
||
|
}
|