Emacs, rls/racer: jump to Struct/Enum

  1. I am using Emacs.
  2. I have RLS / Racer installed.
  3. Putting cursor over a function, "jump to definition" works.
  4. I know about helm-lsp-workspace-symbol (but it lists too much).

Question: Is there some command that lists all the (and only the) Struct/Enum of the given workspace, and let me interactively narrow it, and jump to definition ?

Seems unlikely, this isn't supported in the protocol: https://github.com/microsoft/language-server-protocol/issues/941

1 Like

https://github.com/microsoft/language-server-protocol/issues/941#issuecomment-615961898 looks like exactly the problem I ran into.

How are you dealing with this?

I use rust-analyzer :stuck_out_tongue: It has a heuristic where, by default, it looks for type-like things, and only adds functions and other smaller symbols if looking for types gave zero results. It also has an "easter egg" that adding * to the query string forces the search for all symbols (and # forces the search in dependencies). This sadly doesn't work in VS Code, but should work in Emacs.

1 Like

Everything works now with rust-analyzer. Thanks!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.