Debug slow php omnicomplete in vim

I am using vim with php omnicompletion in a big project. I have a ctags file and using:

au FileType python set omnifunc=pythoncomplete#Complete
au FileType php set omnifunc=phpcomplete#CompletePHP
au FileType javascript set omnifunc=javascriptcomplete#CompleteJS
au FileType html set omnifunc=htmlcomplete#CompleteTags
au FileType css set omnifunc=csscomplete#CompleteCSS
au FileType xml set omnifunc=xmlcomplete#CompleteTags

set complete=""
set complete+=.
set complete+=k
set complete+=b
set complete+=t

in my configuration

Omnni complete will now complete php installation in 5 seconds. It will not populate anything from my tag list, however it <C-p>will populate items from the tag list. I thought complete = t would check the tag file.

Completing tags through <C-p>is very fast, so I'm not sure what my omni completion weighs so surprisingly slow.

If I edit a fresh .php file in my home directory and this project, the php built into omni complete will be fast.

/, . , omni , ctags, , , complete = t docs.

+3
1

<C-p> . complete <C-p>/<C-n> <C-x><C-l>. , omnicompletion , , .

PHP , , . , omnicompletion , , , . , , , , , , , .

+2

Source: https://habr.com/ru/post/1731407/


All Articles