Adapted neosnippets source. Examples by petobens.
This commit is contained in:
parent
e6d335aa40
commit
ba2f30fdf9
@ -4,12 +4,27 @@ set cpo&vim
|
|||||||
let s:source = {
|
let s:source = {
|
||||||
\ 'name' : 'ultisnips',
|
\ 'name' : 'ultisnips',
|
||||||
\ 'kind' : 'keyword',
|
\ 'kind' : 'keyword',
|
||||||
|
\ 'mark' : '[US]',
|
||||||
\ 'rank' : 8,
|
\ 'rank' : 8,
|
||||||
\ 'mark' : '[U]',
|
\ 'matchers' :
|
||||||
\}
|
\ (g:neocomplete#enable_fuzzy_completion ?
|
||||||
|
\ ['matcher_fuzzy'] : ['matcher_head']),
|
||||||
|
\ 'min_pattern_length' : 1,
|
||||||
|
\ 'max_candidates' : 20,
|
||||||
|
\ 'is_volatile': 1,
|
||||||
|
\ }
|
||||||
|
|
||||||
function! s:source.gather_candidates(context)
|
function! s:source.gather_candidates(context)
|
||||||
return keys(UltiSnips#SnippetsInCurrentScope())
|
let suggestions = []
|
||||||
|
let snippets = UltiSnips#SnippetsInCurrentScope()
|
||||||
|
for trigger in keys(snippets)
|
||||||
|
let description = get(snippets, trigger)
|
||||||
|
call add(suggestions, {
|
||||||
|
\ 'word' : trigger,
|
||||||
|
\ 'menu' : self.mark . ' '. description
|
||||||
|
\ })
|
||||||
|
endfor
|
||||||
|
return suggestions
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! neocomplete#sources#ultisnips#define()
|
function! neocomplete#sources#ultisnips#define()
|
||||||
|
@ -1381,6 +1381,7 @@ individuals have contributed to UltiSnips (in chronological order):
|
|||||||
Gernot Höflechner - LFDM
|
Gernot Höflechner - LFDM
|
||||||
Marcelo D Montu - mMontu
|
Marcelo D Montu - mMontu
|
||||||
Karl Yngve Lervåg - lervag
|
Karl Yngve Lervåg - lervag
|
||||||
|
petobens
|
||||||
|
|
||||||
Thank you for your support.
|
Thank you for your support.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user