diff options
Diffstat (limited to 'fnl/plugins/editor')
-rw-r--r-- | fnl/plugins/editor/git-worktree.fnl | 17 | ||||
-rw-r--r-- | fnl/plugins/editor/telescope.fnl | 4 |
2 files changed, 19 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 |