diff options
| author | bors <bors@rust-lang.org> | 2024-02-06 05:27:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-06 05:27:55 +0000 |
| commit | 35551d059c17ed89aefdd0d3b4194f61fa5e312f (patch) | |
| tree | 78f8824f1d20458c113d6148421ee9b9e8482910 /src/tools/rust-analyzer/editors/code | |
| parent | f45a5b10a071f9f5b259a6502ed9b39243d1d7b5 (diff) | |
| parent | 08e774179e237ec9235760104eb01c3fa481b3fe (diff) | |
| download | rust-35551d059c17ed89aefdd0d3b4194f61fa5e312f.tar.gz rust-35551d059c17ed89aefdd0d3b4194f61fa5e312f.zip | |
Auto merge of #3291 - rust-lang:rustup-2024-02-06, r=saethlin
Automatic Rustup
Diffstat (limited to 'src/tools/rust-analyzer/editors/code')
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/package.json | 5 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/src/main.ts | 34 |
2 files changed, 29 insertions, 10 deletions
diff --git a/src/tools/rust-analyzer/editors/code/package.json b/src/tools/rust-analyzer/editors/code/package.json index 5ed5146ea1b..841e364ed84 100644 --- a/src/tools/rust-analyzer/editors/code/package.json +++ b/src/tools/rust-analyzer/editors/code/package.json @@ -1505,6 +1505,11 @@ "default": false, "type": "boolean" }, + "rust-analyzer.references.excludeTests": { + "markdownDescription": "Exclude tests from find-all-references.", + "default": false, + "type": "boolean" + }, "rust-analyzer.rename.allowExternalItems": { "markdownDescription": "Allow renaming of items not belonging to the loaded workspaces.", "default": false, diff --git a/src/tools/rust-analyzer/editors/code/src/main.ts b/src/tools/rust-analyzer/editors/code/src/main.ts index 599cfb4ff77..c386b9e5d8f 100644 --- a/src/tools/rust-analyzer/editors/code/src/main.ts +++ b/src/tools/rust-analyzer/editors/code/src/main.ts @@ -25,16 +25,7 @@ export async function deactivate() { export async function activate( context: vscode.ExtensionContext, ): Promise<RustAnalyzerExtensionApi> { - if (vscode.extensions.getExtension("rust-lang.rust")) { - vscode.window - .showWarningMessage( - `You have both the rust-analyzer (rust-lang.rust-analyzer) and Rust (rust-lang.rust) ` + - "plugins enabled. These are known to conflict and cause various functions of " + - "both plugins to not work correctly. You should disable one of them.", - "Got it", - ) - .then(() => {}, console.error); - } + checkConflictingExtensions(); const ctx = new Ctx(context, createCommands(), fetchWorkspace()); // VS Code doesn't show a notification when an extension fails to activate @@ -200,3 +191,26 @@ function createCommands(): Record<string, CommandFactory> { revealDependency: { enabled: commands.revealDependency }, }; } + +function checkConflictingExtensions() { + if (vscode.extensions.getExtension("rust-lang.rust")) { + vscode.window + .showWarningMessage( + `You have both the rust-analyzer (rust-lang.rust-analyzer) and Rust (rust-lang.rust) ` + + "plugins enabled. These are known to conflict and cause various functions of " + + "both plugins to not work correctly. You should disable one of them.", + "Got it", + ) + .then(() => {}, console.error); + } + + if (vscode.extensions.getExtension("panicbit.cargo")) { + vscode.window + .showWarningMessage( + `You have both the rust-analyzer (rust-lang.rust-analyzer) and Cargo (panicbit.cargo) plugins enabled` + + 'you can disable it or set {"cargo.automaticCheck": false} in settings.json to avoid invoking cargo twice', + "Got it", + ) + .then(() => {}, console.error); + } +} |
