diff --git a/.gitmodules b/.gitmodules index 99c885e..7a540eb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "zsh/.zsh/zsh-syntax-highlighting"] path = zsh/.zsh/zsh-syntax-highlighting 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 diff --git a/nvim/.config/nvim/lua/plugins/git-worktree.lua b/nvim/.config/nvim/lua/plugins/git-worktree.lua new file mode 100644 index 0000000..3081a68 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/git-worktree.lua @@ -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 = -- default: "e .", + -- clearjumps_on_change = -- default: true, + -- autopush = -- default: false, + }) + vim.keymap.set("n", "w", function() + require("telescope").extensions.git_worktree.git_worktrees() + end, { desc = "Switch/delete worktrees" }) + vim.keymap.set("n", "W", function() + require("telescope").extensions.git_worktree.create_git_worktree() + end, { desc = "Create worktree" }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua index adff8ae..e02b598 100644 --- a/nvim/.config/nvim/lua/plugins/telescope.lua +++ b/nvim/.config/nvim/lua/plugins/telescope.lua @@ -104,8 +104,7 @@ return { -- Fuzzy Finder (files, lsp, etc) pcall(require("telescope").load_extension, "ui-select") pcall(require("telescope").load_extension, "file_browser") pcall(require("telescope").load_extension, "zoxide") - pcall(require("telescope").load_extension, "harpoon") - pcall(require("telescope").load_extension, "harpoon") + pcall(require("telescope").load_extension, "git_worktree") -- See `:help telescope.builtin` vim.keymap.set( "n", diff --git a/zsh/.zsh/zsh-history-substring-search b/zsh/.zsh/zsh-history-substring-search new file mode 160000 index 0000000..87ce96b --- /dev/null +++ b/zsh/.zsh/zsh-history-substring-search @@ -0,0 +1 @@ +Subproject commit 87ce96b1862928d84b1afe7c173316614b30e301