diff options
-rw-r--r-- | fnl/plugins/editor/git-worktree.fnl | 17 | ||||
-rw-r--r-- | fnl/plugins/editor/telescope.fnl | 4 | ||||
-rw-r--r-- | lazy-lock.json | 1 |
3 files changed, 20 insertions, 2 deletions
diff --git a/fnl/plugins/editor/git-worktree.fnl b/fnl/plugins/editor/git-worktree.fnl new file mode 100644 index 0000000..508d42a --- /dev/null +++ b/fnl/plugins/editor/git-worktree.fnl @@ -0,0 +1,17 @@ +;; Plugins for working with git-worktrees. + +(local keys [{1 :<leader>ge + 2 "<cmd>lua require('telescope').extensions.git_worktree.git_worktrees()<cr>" + :mode :n + :desc "Switch between worktrees"} + {1 :<leader>gi + 2 "<cmd>lua require('telescope').extensions.git_worktree.create_git_worktree()<cr>" + :mode :n + :desc "Create a worktree"}]) + +{1 :ThePrimeagen/git-worktree.nvim + :event :VeryLazy + : keys + :init (fn [] + (let [telescope (require :telescope)] + (telescope.load_extension :git_worktree)))} diff --git a/fnl/plugins/editor/telescope.fnl b/fnl/plugins/editor/telescope.fnl index c823474..dafb48c 100644 --- a/fnl/plugins/editor/telescope.fnl +++ b/fnl/plugins/editor/telescope.fnl @@ -19,7 +19,7 @@ {1 :<leader>fS 2 "<cmd>Telescope grep_string theme=dropdown<cr>" :desc "Find String"} - {1 :<leader>fb + {1 :<leader>gb 2 "<cmd>Telescope git_branches theme=dropdown<cr>" :desc "Checkout Branch"} {1 :<leader>ff 2 :<cmd>FindFiles<cr> :desc "Find files"} @@ -44,7 +44,7 @@ {1 :<leader>js 2 "<cmd>Telescope diagnostics theme=dropdown<cr>" :desc "Telescope Diagnostics"} - {1 :<leader>fc + {1 :<leader>gc 2 "<cmd>Telescope git_commits theme=dropdown<cr>" :desc "Checkout Commit"} {1 :<leader>lS diff --git a/lazy-lock.json b/lazy-lock.json index 475dac4..cdcbd12 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -16,6 +16,7 @@ "easyread.nvim": { "branch": "main", "commit": "0b07e315a4cd7d700c4a794bdddbec79fdc2628b" }, "flit.nvim": { "branch": "main", "commit": "498b3a4864e697f1ed1145e518c4c78c776c55d8" }, "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, + "git-worktree.nvim": { "branch": "master", "commit": "d7f4e2584e81670154f07ca9fa5dd791d9c1b458" }, "gitsigns.nvim": { "branch": "main", "commit": "907ae8636016aab2f283576fc60d46ca3427e579" }, "harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, "hotpot.nvim": { "branch": "master", "commit": "1dc11eb47ca15828df8ed3c7a014eeca9c564e55" }, |