Adapted neosnippets source. Examples by petobens.

This commit is contained in:
Holger Rapp 2014-03-06 06:47:55 +01:00
parent e6d335aa40
commit ba2f30fdf9
2 changed files with 23 additions and 7 deletions

View File

@ -2,18 +2,33 @@ let s:save_cpo = &cpo
set cpo&vim
let s:source = {
\ 'name' : 'ultisnips',
\ 'kind' : 'keyword',
\ 'rank' : 8,
\ 'mark' : '[U]',
\}
\ 'name' : 'ultisnips',
\ 'kind' : 'keyword',
\ 'mark' : '[US]',
\ 'rank' : 8,
\ '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)
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
function! neocomplete#sources#ultisnips#define()
return s:source
return s:source
endfunction
let &cpo = s:save_cpo

View File

@ -1381,6 +1381,7 @@ individuals have contributed to UltiSnips (in chronological order):
Gernot Höflechner - LFDM
Marcelo D Montu - mMontu
Karl Yngve Lervåg - lervag
petobens
Thank you for your support.