mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 04:40:06 +08:00
24 lines
715 B
VimL
24 lines
715 B
VimL
let s:unite_source = {
|
|
\ 'name': 'unicode',
|
|
\ 'hooks': {},
|
|
\ 'action_table': {'*': {}},
|
|
\ }
|
|
|
|
function! s:unite_source.gather_candidates(args, context)
|
|
let filelist = unite#util#sort_by(unite#util#uniq_by(
|
|
\ map(split(globpath(g:unite_unicode_data_path, '*.txt'), '\n'),
|
|
\'[fnamemodify(v:val, ":t:r"), fnamemodify(v:val, ":p")]'), 'v:val[0]'),
|
|
\'v:val[0]')
|
|
|
|
return map(filelist, '{
|
|
\ "word": v:val[0],
|
|
\ "source": "unicode",
|
|
\ "kind": "unicode",
|
|
\ }')
|
|
endfunction
|
|
|
|
function! unite#sources#unicode#define()
|
|
return s:unite_source
|
|
endfunction
|
|
|