Merge branch 'nixvim'

This commit is contained in:
Sam 2025-01-17 09:43:10 +00:00
commit 6521a7240b
3 changed files with 34 additions and 0 deletions

View File

@ -23,6 +23,7 @@ in {
./todo-comments.nix ./todo-comments.nix
./oil.nix ./oil.nix
./comment.nix ./comment.nix
./git-workree.nix
]; ];
programs.nixvim.plugins.web-devicons.enable = true; programs.nixvim.plugins.web-devicons.enable = true;

View File

@ -0,0 +1,26 @@
{
programs.nixvim.keymaps = [
# Switching worktrees
{
mode = ["n"];
key = "<leader>fws";
action = "<cmd>lua require('telescope').extensions.git_worktree.git_worktrees()<CR>";
options = {noremap = true;};
}
{
mode = ["n"];
key = "<leader>fwc";
action = "<cmd>lua require('telescope').extensions.git_worktree.create_git_worktree()<CR>";
options = {noremap = true;};
}
];
programs.nixvim.plugins.git-worktree = {
enable = true;
enableTelescope = true;
autopush = true;
changeDirectoryCommand = "cd";
clearJumpsOnChange = true;
updateOnChange = true;
updateOnChangeCommand = "e .";
};
}

View File

@ -46,5 +46,12 @@
action = "<cmd>Telescope oldfiles<CR>"; action = "<cmd>Telescope oldfiles<CR>";
options = {noremap = true;}; options = {noremap = true;};
} }
{
# show recently opened files
mode = ["n"];
key = "<Leader>fk";
action = "<cmd>Telescope keymaps<CR>";
options = {noremap = true;};
}
]; ];
} }