Add action to unite source (#330)
This commit is contained in:
parent
4998af215a
commit
3b94a6e6b8
@ -10,15 +10,20 @@ set cpo&vim
|
|||||||
let s:source = {
|
let s:source = {
|
||||||
\ 'name' : 'vimtex_toc',
|
\ 'name' : 'vimtex_toc',
|
||||||
\ 'sorters' : 'sorter_nothing',
|
\ 'sorters' : 'sorter_nothing',
|
||||||
|
\ 'default_kind' : 'jump_list',
|
||||||
\}
|
\}
|
||||||
|
|
||||||
function! s:source.gather_candidates(args, context)
|
function! s:source.gather_candidates(args, context) " {{{1
|
||||||
let entries = vimtex#toc#get_entries()
|
let entries = vimtex#toc#get_entries()
|
||||||
return map(entries, '{
|
return map(entries, '{
|
||||||
\ "word" : v:val.title,
|
\ "word" : v:val.title,
|
||||||
|
\ "action__path" : v:val.file,
|
||||||
|
\ "action__line" : v:val.line,
|
||||||
\ }')
|
\ }')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
|
||||||
function! unite#sources#vimtex_toc#define()
|
function! unite#sources#vimtex_toc#define()
|
||||||
return s:source
|
return s:source
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user