mirror of
https://github.com/wellle/tmux-complete.vim.git
synced 2025-12-21 12:19:32 +01:00
20 lines
539 B
VimL
20 lines
539 B
VimL
function! coc#source#tmuxcomplete#init() abort
|
|
return {
|
|
\ 'priority': 1,
|
|
\ 'shortcut': 'TMUX',
|
|
\ }
|
|
endfunction
|
|
|
|
function! coc#source#tmuxcomplete#complete(opt, callback) abort
|
|
let Callback = function('s:ListToDict', [a:callback]) " wrap callback
|
|
call tmuxcomplete#async#gather_candidates(Callback)
|
|
endfunction
|
|
|
|
function! s:ListToDict(callback, items)
|
|
let res = []
|
|
for item in a:items
|
|
call add(res, {'word' : item})
|
|
endfor
|
|
call a:callback(res)
|
|
endfunction
|