worktree
This commit is contained in:
parent
37e521d9cc
commit
4207f62b7f
|
@ -7,3 +7,6 @@
|
||||||
[submodule "zsh/.zsh/zsh-syntax-highlighting"]
|
[submodule "zsh/.zsh/zsh-syntax-highlighting"]
|
||||||
path = zsh/.zsh/zsh-syntax-highlighting
|
path = zsh/.zsh/zsh-syntax-highlighting
|
||||||
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||||
|
[submodule "zsh/.zsh/zsh-history-substring-search"]
|
||||||
|
path = zsh/.zsh/zsh-history-substring-search
|
||||||
|
url = https://github.com/zsh-users/zsh-history-substring-search.git
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
return {
|
||||||
|
"ThePrimeagen/git-worktree.nvim",
|
||||||
|
config = function()
|
||||||
|
require("git-worktree").setup({
|
||||||
|
-- change_directory_command = "cd", -- default: "cd",
|
||||||
|
-- update_on_change = "" -- default: true,
|
||||||
|
-- update_on_change_command = <str> -- default: "e .",
|
||||||
|
-- clearjumps_on_change = <boolean> -- default: true,
|
||||||
|
-- autopush = <boolean> -- default: false,
|
||||||
|
})
|
||||||
|
vim.keymap.set("n", "<leader>w", function()
|
||||||
|
require("telescope").extensions.git_worktree.git_worktrees()
|
||||||
|
end, { desc = "Switch/delete worktrees" })
|
||||||
|
vim.keymap.set("n", "<leader>W", function()
|
||||||
|
require("telescope").extensions.git_worktree.create_git_worktree()
|
||||||
|
end, { desc = "Create worktree" })
|
||||||
|
end,
|
||||||
|
}
|
|
@ -104,8 +104,7 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
||||||
pcall(require("telescope").load_extension, "ui-select")
|
pcall(require("telescope").load_extension, "ui-select")
|
||||||
pcall(require("telescope").load_extension, "file_browser")
|
pcall(require("telescope").load_extension, "file_browser")
|
||||||
pcall(require("telescope").load_extension, "zoxide")
|
pcall(require("telescope").load_extension, "zoxide")
|
||||||
pcall(require("telescope").load_extension, "harpoon")
|
pcall(require("telescope").load_extension, "git_worktree")
|
||||||
pcall(require("telescope").load_extension, "harpoon")
|
|
||||||
-- See `:help telescope.builtin`
|
-- See `:help telescope.builtin`
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
"n",
|
"n",
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 87ce96b1862928d84b1afe7c173316614b30e301
|
Loading…
Reference in New Issue