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 set cpo&vim
let s:source = { let s:source = {
\ 'name' : 'ultisnips', \ 'name' : 'ultisnips',
\ 'kind' : 'keyword', \ 'kind' : 'keyword',
\ 'rank' : 8, \ 'mark' : '[US]',
\ 'mark' : '[U]', \ '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) 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()
return s:source return s:source
endfunction endfunction
let &cpo = s:save_cpo let &cpo = s:save_cpo

View File

@ -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.