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: Add support for querying workspace symbols and filtering by kind · Issue #941 · microsoft/language-server-protocol · GitHub

1 Like

Add support for querying workspace symbols and filtering by kind · Issue #941 · microsoft/language-server-protocol · GitHub 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!