mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-14 01:57:58 +08:00
feat(rebase): complete after :Git rebase
This commit is contained in:
parent
3829f764fa
commit
21315be59f
@ -119,6 +119,8 @@ function! git#complete(ArgLead, CmdLine, CursorPos) abort
|
||||
return git#reflog#complete(a:ArgLead, a:CmdLine, a:CursorPos)
|
||||
elseif str =~# '^Git\s\+clean\s\+.*$'
|
||||
return git#clean#complete(a:ArgLead, a:CmdLine, a:CursorPos)
|
||||
elseif str =~# '^Git\s\+rebase\s\+.*$'
|
||||
return git#rebase#complete(a:ArgLead, a:CmdLine, a:CursorPos)
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
|
@ -1,3 +1,8 @@
|
||||
if has('nvim-0.9.0')
|
||||
function! git#rebase#complete(ArgLead, CmdLine, CursorPos) abort
|
||||
return luaeval('require("git.command.rebase").complete(vim.api.nvim_eval("a:ArgLead"), vim.api.nvim_eval("a:CmdLine"), vim.api.nvim_eval("a:CursorPos"))')
|
||||
endfunction
|
||||
else
|
||||
let s:JOB = SpaceVim#api#import('job')
|
||||
let s:BUFFER = SpaceVim#api#import('vim#buffer')
|
||||
" @todo rewrite Git rebase in lua
|
||||
@ -101,4 +106,4 @@ function! s:on_rebase_continue(id, data, event) abort
|
||||
echo 'failed!'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
endif
|
||||
|
@ -135,5 +135,8 @@ function m.run(argv)
|
||||
on_stderr = on_std,
|
||||
})
|
||||
end
|
||||
function m.complete(ArgLead, CmdLine, CursorPos)
|
||||
return table.concat({'-i', '--abort'}, '\n')
|
||||
end
|
||||
|
||||
return m
|
||||
|
Loading…
Reference in New Issue
Block a user