Commits

Yuki KODAMA committed 8c9688f

vim: enhancement for eclim

  • Participants
  • Parent commits f3427ee
  • Branches p183

Comments (0)

Files changed (3)

 let g:neocomplcache_enable_auto_select = 1
 let g:neocomplcache_min_keyword_length = 3
 let g:neocomplcache_min_syntax_length = 3
-let g:neocomplcache_plugin_completion_length_list = {
+let g:neocomplcache_plugin_completion_length = {
   \ 'buffer_complete'    : 1,
+  \ 'eclim_complete'     : 1,
   \ 'snippets_complete'  : 2,
   \ 'keyword_complete'   : 2,
   \ 'include_complete'   : 3,

vimfiles/autoload/neocomplcache/sources/eclim_complete.vim

+let s:save_cpo = &cpo
+set cpo&vim
+
+let s:source = {
+      \ 'name' : 'eclim_complete',
+      \ 'kind' : 'complfunc',
+      \}
+
+function! s:source.initialize()"{{{
+endfunction"}}}
+
+function! s:source.finalize()"{{{
+endfunction"}}}
+
+function! neocomplcache#sources#eclim_complete#define()"{{{
+  return s:source
+endfunction"}}}
+
+function! s:source.get_keyword_pos(cur_text)"{{{
+  return eclim#java#complete#CodeComplete(1, '')
+endfunction"}}}
+
+function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str)"{{{
+  return eclim#java#complete#CodeComplete(0, a:cur_keyword_str)
+endfunction"}}}
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+
+" vim: foldmethod=marker

vimfiles/eclim/ftplugin/java/eclim.vim

 
 " Options {{{
 
-setlocal completefunc=eclim#java#complete#CodeComplete
+"setlocal completefunc=eclim#java#complete#CodeComplete
 
 if g:EclimJavaSetCommonOptions
   " allow cpp keywords in java files (delete, friend, union, template, etc).