mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Merge commit '0113bc9388
' into sync-from-ra
This commit is contained in:
parent
f43cea0878
commit
b8a3180a60
197 changed files with 3106 additions and 2007 deletions
|
@ -6,9 +6,7 @@
|
|||
"brackets": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["#[", "]"],
|
||||
["#![", "]"]
|
||||
["(", ")"]
|
||||
],
|
||||
"colorizedBracketPairs": [
|
||||
["{", "}"],
|
||||
|
@ -19,8 +17,6 @@
|
|||
{ "open": "{", "close": "}" },
|
||||
{ "open": "[", "close": "]" },
|
||||
{ "open": "(", "close": ")" },
|
||||
{ "open": "#[", "close": "]" },
|
||||
{ "open": "#![", "close": "]" },
|
||||
{ "open": "\"", "close": "\"", "notIn": ["string"] },
|
||||
{ "open": "/*", "close": " */" },
|
||||
{ "open": "`", "close": "`", "notIn": ["string"] }
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue