vscode-youcompleteme
vscode-youcompleteme copied to clipboard
Autocompletion not working at VScode but in VIM
I have problem with auto completion using VSCode, some cpp files the auto suggestion does not work at all, but when I tried it at VIM, there is no problem with the auto suggestion
May I know how can I help you to find this bug? I have the debug log printed below..
[ycm stderr] 2017-05-03 10:56:18,243 - ERROR - Exception from semantic completer (using general): Traceback (most recent call last):
File "/home/tim/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 103, in GetCompletions
.ComputeCandidates( request_data ) )
File "/home/tim/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 217, in ComputeCandidates
candidates = self._GetCandidatesFromSubclass( request_data )
File "/home/tim/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 233, in _GetCandidatesFromSubclass
raw_completions = self.ComputeCandidatesInner( request_data )
File "/home/tim/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 95, in ComputeCandidatesInner
raise RuntimeError( PARSING_FILE_MESSAGE )
RuntimeError: Still parsing file, no completions yet.
[_request] status code: 200
[_request] {"errors": [{"exception": {"TYPE": "RuntimeError"}, "traceback": "Traceback (most recent call last):\n File \"/home/tim/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py\", line 103, in GetCompletions\n .ComputeCandidates( request_data ) )\n File \"/home/tim/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py\", line 217, in ComputeCandidates\n candidates = self._GetCandidatesFromSubclass( request_data )\n File \"/home/tim/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py\", line 233, in _GetCandidatesFromSubclass\n raw_completions = self.ComputeCandidatesInner( request_data )\n File \"/home/tim/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py\", line 95, in ComputeCandidatesInner\n raise RuntimeError( PARSING_FILE_MESSAGE )\nRuntimeError: Still parsing file, no completions yet.\n", "message": "Still parsing file, no completions yet."}], "completions": [], "completion_start_column": 16}
[completion] ycm responsed 0 items
[_request] status code: 200
[_request] {"fixits": []}
and sometimes it works after i tried manually triggering the suggestion by inputting Ctrl
+ Space
, after few times the suggestion will pop up..
and I tried the Atom editor plugin for you complete me, I dont have the problem mention above.. https://atom.io/packages/you-complete-me
The extension doesn't return anything if a completion is asked for while the file is still being parsed (as you can see in the error 'Still parsing file, no completions yet.'). As you experienced, it eventually starts working when libclang has finished parsing the translation unit. this vscode extension could do a better job waiting for the completion when getting that error message rather than giving up on the completion entirely, but i don't think the root cause is something specific to this particular extension's use of ycmd.