mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-18 01:29:06 +00:00
feat(nvim): GitOpen add menu items
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user