diff --git a/autoload/leaderf/thematic.vim b/autoload/leaderf/thematic.vim new file mode 100644 index 0000000..68e3287 --- /dev/null +++ b/autoload/leaderf/thematic.vim @@ -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 "}}} diff --git a/plugin/thematic.vim b/plugin/thematic.vim index 98e0a75..ca3c3f9 100644 --- a/plugin/thematic.vim +++ b/plugin/thematic.vim @@ -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