Skip to content

Commit

Permalink
Change default path for rust-analyzer
Browse files Browse the repository at this point in the history
Assume standard installation is via rustup and use the .cargo path
instead
  • Loading branch information
mickaelistria committed Nov 17, 2023
1 parent abca843 commit 7d2ee7c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class RustManager {
* Set according to rust-analyzer documentation
*/
static final File RUST_ANALYZER_DEFAULT_LOCATION = new File(System.getProperty("user.home"), //$NON-NLS-1$
".local/bin/rust-analyzer"); //$NON-NLS-1$
".cargo/bin/rust-analyzer"); //$NON-NLS-1$
public static final String RLS_VERSION_FORMAT_REGEX = "^(rls|rust-analyzer).*$"; //$NON-NLS-1$
public static final String CARGO_VERSION_FORMAT_REGEX = "^cargo .*$"; //$NON-NLS-1$
public static final String RUSTUP_VERSION_FORMAT_REGEX = "^rustup .*$"; //$NON-NLS-1$
Expand Down Expand Up @@ -146,7 +146,7 @@ protected IStatus run(IProgressMonitor monitor) {
toolchainId));
jobs.add(createRustupCommandJob(Messages.RustManager_addingRustAnalysisRustSrc,
Messages.RustManager_unableToAddComponent, "component", //$NON-NLS-1$
"add", "rust-analysis")); //$NON-NLS-1$ //$NON-NLS-2$
"add", "rust-analysis", "rust-analyzer")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

for (CommandJob commandJob : jobs) {
currentCommandJob = commandJob;
Expand Down

0 comments on commit 7d2ee7c

Please sign in to comment.