GoTo references doesn't seem to work now
Closed this issue · 5 comments
Our ycmd-goto-references
invokes (ycmd--goto "GoToReferences")
. However, in the *ycmd-server*
buffer I see:
ValueError: Supported commands are:
ClearCompilationFlagCache
FixIt
GetDoc
GetDocQuick
GetParent
GetType
GoTo
GoToDeclaration
GoToDefinition
GoToImprecise
GoToInclude
See the docs for information on what they do.
So it appears that GoToReferences
is no longer supported. I figured ycmd moved that functionality elsewhere or removed it entirely.
Apparently goto-references is only supported for some ycmd backends, and not C++ which I was trying. Oh well.
Yes GoToReferences
is only supported in the Python, Javascript and Typescript completers.
We have an API to know which subcommands are available for a given engine http://puremourning.github.io/ycmd-1/#path--defined_subcommands. I don't know if you guys were aware about it or if you already use it 😜
@vheon Thanks for pointing the defined_commands
API out. I was aware of it but it just was not implemented in emacs-ycmd
. But I"ll look into how to implement it for emacs-ycmd
.
@ptrv I figure that users may try calling "goto-*" even if it's not defined for the current mode, so it's probably simplest to just display a message saying something like "Goto XXX not available for the current mode". We may not even need to rely on the defined_commands
API, instead just looking for failures in the goto command itself.