Skip to content

Instantly share code, notes, and snippets.

@liquidz
Last active March 23, 2023 01:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liquidz/9a7e1a4cdbc40ff110138847c4278d26 to your computer and use it in GitHub Desktop.
Save liquidz/9a7e1a4cdbc40ff110138847c4278d26 to your computer and use it in GitHub Desktop.
" requires https://github.com/liquidz/ddu-source-custom-list
" cf. https://github.com/mattn/vim-sonictemplate/blob/master/autoload/fzf/sonictemplate.vim
function! s:ddu_sonictemplate() abort
let id = denops#callback#register(
\ {s -> sonictemplate#apply(s, 'n')},
\ {'once': v:true})
call ddu#start({'sources': [
\ {'name': 'custom-list',
\ 'params': {'texts': sonictemplate#complete('', '', 0), 'callbackId': id}}]})
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment