Add support for leaderf

This commit is contained in:
Freed-Wu
2020-09-16 21:51:27 +08:00
committed by Caleb Maclennan
parent 66dc16eb8d
commit 9ef9d29705
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
function! leaderf#thematic#source(args) abort "{{{
return keys(g:thematic#themes)
endfunction "}}}
function! leaderf#thematic#accept(line, args) abort "{{{
execute 'Thematic ' . a:line
endfunction "}}}

View File

@@ -88,6 +88,23 @@ else
let g:thematic#theme_name = ''
endif
if exists('g:leaderf_loaded')
if !exists('g:Lf_Extensions')
let g:Lf_Extensions = {}
endif
let g:Lf_Extensions.thematic = {
\ 'source': 'leaderf#thematic#source',
\ 'accept': 'leaderf#thematic#accept',
\ 'highlights_def': {
\ 'Lf_hl_thematicTitle': '.*',
\ },
\ 'highlights_cmd': [
\ 'hi link Lf_hl_thematicTitle Title',
\ ],
\ }
endif
let &cpo = s:save_cpo
unlet s:save_cpo
" vim:ts=2:sw=2:sts=2