Remove markers
This commit is contained in:
@@ -11,15 +11,15 @@ let s:source = {
|
||||
\ g:neocomplcache_auto_completion_start_length,
|
||||
\}
|
||||
|
||||
function! s:source.initialize() abort "{{{
|
||||
function! s:source.initialize() abort
|
||||
" Initialize.
|
||||
call neocomplcache#set_dictionary_helper(
|
||||
\ g:neocomplcache_source_rank, 'snippets_complete', 8)
|
||||
call neocomplcache#set_completion_length('snippets_complete',
|
||||
\ g:neocomplcache_auto_completion_start_length)
|
||||
endfunction"}}}
|
||||
endfunction
|
||||
|
||||
function! s:source.get_keyword_pos(cur_text) abort "{{{
|
||||
function! s:source.get_keyword_pos(cur_text) abort
|
||||
let cur_word = matchstr(a:cur_text, '\w\+$')
|
||||
let word_candidates = neocomplcache#keyword_filter(
|
||||
\ filter(values(neosnippet#helpers#get_snippets()),
|
||||
@@ -29,9 +29,9 @@ function! s:source.get_keyword_pos(cur_text) abort "{{{
|
||||
endif
|
||||
|
||||
return match(a:cur_text, '\S\+$')
|
||||
endfunction"}}}
|
||||
endfunction
|
||||
|
||||
function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str) abort "{{{
|
||||
function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str) abort
|
||||
let list = s:keyword_filter(neosnippet#helpers#get_snippets(), a:cur_keyword_str)
|
||||
|
||||
for snippet in list
|
||||
@@ -42,9 +42,9 @@ function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str) abort "{
|
||||
endfor
|
||||
|
||||
return list
|
||||
endfunction"}}}
|
||||
endfunction
|
||||
|
||||
function! s:keyword_filter(snippets, cur_keyword_str) abort "{{{
|
||||
function! s:keyword_filter(snippets, cur_keyword_str) abort
|
||||
" Uniq by real_name.
|
||||
let dict = {}
|
||||
|
||||
@@ -65,10 +65,8 @@ function! s:keyword_filter(snippets, cur_keyword_str) abort "{{{
|
||||
endfor
|
||||
|
||||
return values(dict)
|
||||
endfunction"}}}
|
||||
endfunction
|
||||
|
||||
function! neocomplcache#sources#snippets_complete#define() abort "{{{
|
||||
function! neocomplcache#sources#snippets_complete#define() abort
|
||||
return s:source
|
||||
endfunction"}}}
|
||||
|
||||
" vim: foldmethod=marker
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user