2024-03-24 23:39:49 +01:00
|
|
|
{
|
2024-05-29 20:40:03 +02:00
|
|
|
config,
|
|
|
|
lib,
|
2024-03-24 23:39:49 +01:00
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-05-29 20:40:03 +02:00
|
|
|
config = lib.mkIf config.user.nvim.enable {
|
|
|
|
programs.nixvim = {
|
2024-09-28 00:04:19 +02:00
|
|
|
plugins.web-devicons.enable = true;
|
2024-05-29 20:40:03 +02:00
|
|
|
plugins.telescope = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2024-07-31 17:26:59 +02:00
|
|
|
plugins.which-key.settings.spec = [
|
|
|
|
{
|
|
|
|
__unkeyed-1 = "<leader>f";
|
|
|
|
group = "+telescope";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
__unkeyed-1 = "<leader>fg";
|
|
|
|
group = "+telescope git";
|
|
|
|
}
|
|
|
|
];
|
2024-05-29 20:40:03 +02:00
|
|
|
keymaps = [
|
|
|
|
{
|
|
|
|
action = ":Telescope find_files<CR>";
|
|
|
|
key = "<leader>ff";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "files";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope live_grep<CR>";
|
|
|
|
key = "<leader>fg";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "grep";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope buffers<CR>";
|
|
|
|
key = "<leader>fb";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "buffers";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope marks<CR>";
|
|
|
|
key = "<leader>fm";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "marks";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope registers<CR>";
|
|
|
|
key = "<leader>fr";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "registers";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope keymaps<CR>";
|
|
|
|
key = "<leader>fk";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "keymaps";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope current_buffer_fuzzy_find<CR>";
|
|
|
|
key = "<leader>fz";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "fuzzy find";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope git_commits<CR>";
|
|
|
|
key = "<leader>fgc";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "commits";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope git_branches<CR>";
|
|
|
|
key = "<leader>fgb";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "branches";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope git_stash<CR>";
|
|
|
|
key = "<leader>fgs";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "stash";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
action = ":Telescope git_commits<CR>";
|
|
|
|
key = "<leader>fgc";
|
|
|
|
mode = "n";
|
|
|
|
options = {
|
|
|
|
silent = true;
|
|
|
|
desc = "commits";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2024-03-24 23:39:49 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|