feat(nvim): GitOpen add menu items

This commit is contained in:
2024-08-21 16:27:07 +03:00
parent 10f52cee9e
commit 2d7dcfb886
2 changed files with 11 additions and 3 deletions

View File

@@ -4,10 +4,18 @@ vim.api.nvim_create_user_command('GitOpen', function(opts)
local cmd = "git open"
if #args > 0 then
cmd = cmd .. " " .. args
print("Running: " .. cmd)
vim.cmd(":silent !" .. cmd)
else
local types = { "branch", "repo", "commit", "file" }
local type_map = { repo = "Project", branch = "Current branch", commit = "Commit", file = "File" }
local types = { "branch", "pr", "prs", "repo", "commit", "file" }
local type_map = {
repo = "Project",
branch = "Current branch",
commit = "Commit",
file = "File",
pr = "Create/open Pull Request",
prs = "PRs list"
}
vim.ui.select(types, {
prompt = "Git open",
format_item = function(item) return type_map[item] end

View File

@@ -4,7 +4,7 @@ source ~/.zplug/init.zsh
zplug "$DOTFILES/plugins", from:local
# Remote
zplug "chenasraf/git-open", depth:1, at:develop
zplug "chenasraf/git-open", at:develop
zplug "mfaerevaag/wd", as:command, use:"wd.sh", hook-load:"wd() { . $ZPLUG_REPOS/mfaerevaag/wd/wd.sh }"
zplug "romkatv/powerlevel10k", as:theme, depth:1
zplug "zsh-users/zsh-autosuggestions"