Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c++ cannot jump to location #1700

Open
xiedeacc opened this issue Jul 26, 2023 · 2 comments
Open

c++ cannot jump to location #1700

xiedeacc opened this issue Jul 26, 2023 · 2 comments

Comments

@xiedeacc
Copy link

ycmd.completers.language_server.language_server_completer.ResponseFailedException: Request failed: -32001: invalid AST

@xiedeacc
Copy link
Author


Traceback (most recent call last):
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 876, in _handle
    return route.call(**args)
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1756, in wrapper
    rv = callback(*a, **ka)
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/watchdog_plugin.py", line 97, in wrapper
    return callback( *args, **kwargs )
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/hmac_plugin.py", line 62, in wrapper
    body = callback( *args, **kwargs )
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/handlers.py", line 93, in RunCompleterCommand
    return _JsonResponse( completer.OnUserCommand(
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/completer.py", line 481, in OnUserCommand
    return command( self, request_data, arguments[ 1: ] )
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 1758, in <lambda>
    lambda self, request_data, args: self.GetDoc( request_data )
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/cpp/clangd_completer.py", line 274, in GetDoc
    self.GetHoverResponse( request_data )[ 'value' ] )
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 2490, in GetHoverResponse
    response = self.GetConnection().GetResponse(
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 442, in GetResponse
    return response.AwaitResponse( timeout )
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 219, in AwaitResponse
    raise ResponseFailedException( error )
ycmd.completers.language_server.language_server_completer.ResponseFailedException: Request failed: -32001: invalid AST
127.0.0.1 - - [26/Jul/2023 16:42:40] "POST /run_completer_command HTTP/1.1" 500 2212

@bstaletic
Copy link
Collaborator

This usually happens when clangd is unable to parse your source. Can you even compile your source with clang? If clang can not understand your code, there's nothing ycmd can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants