Skip to content

liquidz/ddu-source-custom-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ddu-source-custom-list

Custom list source for ddu.vim

This souce allows you to specify custom text list as a ddu source programatically.

Configuration

call ddu#custom#patch_global({
    \   'kindOptions': {
    \     'custom-list': {
    \       'defaultAction': 'callback',
    \     },
    \   }
    \ })

Usage

let id = denops#callback#register(
    \ {s -> execute(printf('echom "%s"', s), '')},
    \ {'once': v:true})
call ddu#start({'sources': [
    \  {'name': 'custom-list',
    \   'params': {'texts': ['hello', 'world'], 'callbackId': id}}]})

License

Copyright (c) 2022 Masashi Iizuka

Distributed under the MIT License.