https://bugs.kde.org/show_bug.cgi?id=492061
--- Comment #4 from Adam Fontenot <adam.m.fontenot+...@gmail.com> ---
(In reply to Waqar Ahmed from comment #3)
> Another possible way to fix this might be to specify `root` and
> `userWorkspace` in the lsp settings:

Thanks for the hints! I found that the following combination of settings gives
the correct behavior:

            "useWorkspace": true,
            "rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"],

If you have both of these, rust-analyzer

  ✅ Automatically detects the correct project when you open a Rust file
  ✅ Does *not* open a new rust-analyzer instance when I select "go to
definition" on an external symbol.

If you can verify this behavior and can check that this doesn't have any weird
side effects, we could consider making these options part of the Rust defaults?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to