mirror of
https://github.com/preservim/vim-thematic.git
synced 2025-11-10 10:53:50 -05:00
Add support for leaderf
This commit is contained in:
committed by
Caleb Maclennan
parent
66dc16eb8d
commit
9ef9d29705
7
autoload/leaderf/thematic.vim
Normal file
7
autoload/leaderf/thematic.vim
Normal 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 "}}}
|
||||||
@@ -88,6 +88,23 @@ else
|
|||||||
let g:thematic#theme_name = ''
|
let g:thematic#theme_name = ''
|
||||||
endif
|
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
|
let &cpo = s:save_cpo
|
||||||
unlet s:save_cpo
|
unlet s:save_cpo
|
||||||
" vim:ts=2:sw=2:sts=2
|
" vim:ts=2:sw=2:sts=2
|
||||||
|
|||||||
Reference in New Issue
Block a user