mirror of
https://github.com/laixintao/asyncomplete-gitcommit.git
synced 2025-12-16 12:00:17 +01:00
16 lines
414 B
VimL
16 lines
414 B
VimL
function! asyncomplete#sources#gitcommit#completor(opt, ctx) abort
|
|
let l:col = a:ctx['col']
|
|
let l:typed = a:ctx['typed']
|
|
|
|
let l:kw = matchstr(l:typed, '\v\S+$')
|
|
let l:kwlen = len(l:kw)
|
|
|
|
let l:startcol = l:col - l:kwlen
|
|
|
|
let l:matches = [
|
|
\ "bugfix:", "feature:", "[WIP]", "fixup!"
|
|
\ ]
|
|
|
|
call asyncomplete#complete(a:opt['name'], a:ctx, l:startcol, l:matches)
|
|
endfunction
|