feat(nvim): add Git worktree plugin

This commit is contained in:
Oliver Davies 2022-08-06 01:14:11 -04:00
parent 5000deb8b0
commit ea62e712fd
3 changed files with 9 additions and 0 deletions

View file

@ -46,6 +46,7 @@ return packer.startup(function()
use "nvim-lua/popup.nvim"
use "rcarriga/nvim-notify"
use "sheerun/vim-polyglot"
use "theprimeagen/git-worktree.nvim"
use "theprimeagen/refactoring.nvim"
use "tjdevries/express_line.nvim"
use "tpope/vim-repeat"

View file

@ -1,5 +1,7 @@
TelescopeMapArgs = TelescopeMapArgs or {}
local telescope = require "telescope"
local telescope_mapper = function(key, f, options, buffer)
local map_key = vim.api.nvim_replace_termcodes(key .. f, true, true, true)
@ -34,4 +36,9 @@ telescope_mapper("<leader>dl", "diagnostics")
telescope_mapper("<leader>en", "edit_neovim")
telescope_mapper("<leader>ez", "edit_zsh")
local nmap = require "opdavies.keymap".nmap
nmap { "<leader>gm", telescope.extensions.git_worktree.create_git_worktree }
nmap { "<leader>gw", telescope.extensions.git_worktree.git_worktrees }
return telescope_mapper

View file

@ -60,5 +60,6 @@ telescope.setup {
telescope.load_extension "file_browser"
telescope.load_extension "fzf"
telescope.load_extension "git_worktree"
telescope.load_extension "refactoring"
telescope.load_extension "ui-select"