Closed johnmaguire closed 9 years ago
Error detected while processing function youcompleteme#Complete..<SNR>96_GetCompletions:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 3, in GetCompletionsInner
File "/Users/jmaguire/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/omni_completion_request.py", line 30, in Start
self._results = self._omni_completer.ComputeCandidates( self.request_data )
File "/Users/jmaguire/.vim/plugged/YouCompleteMe/autoload/../python/ycm/omni_completer.py", line 60, in ComputeCandidates
request_data )
File "/Users/jmaguire/.vim/plugged/YouCompleteMe/autoload/../third_party/ycmd/ycmd/completers/completer.py", line 163, in ComputeCandidates
candidates = self._GetCandidatesFromSubclass( request_data )
File "/Users/jmaguire/.vim/plugged/YouCompleteMe/autoload/../third_party/ycmd/ycmd/completers/completer.py", line 179, in _GetCandidatesFromSubclass
raw_completions = self.ComputeCandidatesInner( request_data )
File "/Users/jmaguire/.vim/plugged/YouCompleteMe/autoload/../python/ycm/omni_completer.py", line 81, in ComputeCandidatesInner
items = vim.eval( ''.join( omnifunc_call ) )
KeyboardInterrupt
Thanks for the report. Could you give us the output of the command :set omnifunc?
in Vim? This is certainly an issue with the omnifunc function.
Certainly. It reads omnifunc=phpcomplete#CompletePHP
:)
@JohnMaguire what happen if you disable YCM and after typing the ->
you type <C-X><C-O>
in insert mode?
Hopefully I understood you correctly. I ran :let g:ycm_auto_trigger=0
, entered insert mode, put my cursor after ->
and typed C-x C-o
(X, O). Again, vim froze.
Then as I expected the problem is not in YCM but the omnifunc
you're using is freezing vim. So here there is nothing we can do about it, so closing. Anyway in a comment of a related issue (https://github.com/Valloric/YouCompleteMe/issues/1548#issuecomment-146248076) someone suggested to use an updated version of the omnifunc
for PHP (https://github.com/shawncplus/phpcomplete.vim). I don't know if it will help you or if you're already using it.
@vheon Thank you very much for that link. The phpcomplete.vim plugin did indeed fix the issue. :+1:
Proof of concept:
Start typing world at the end. As soon as you type "w" it will freeze.
Method chaining alone works fine (i.e.
$o->hello()->world()
), but when you pass a closure into one of the methods in the chain, YCM trips up.