Skip to content

Commit 5bed9d6

Browse files
committed
Simplify conflict check
1 parent f872419 commit 5bed9d6

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

editors/code/src/main.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -276,23 +276,13 @@ async function isNixOs(): Promise<boolean> {
276276
}
277277

278278
function warnAboutExtensionConflicts() {
279-
const conflicting = [
280-
["rust-analyzer", "matklad.rust-analyzer"],
281-
["Rust", "rust-lang.rust"],
282-
];
283-
284-
const found = conflicting.filter(
285-
nameId => vscode.extensions.getExtension(nameId[1]) !== undefined);
286-
287-
if (found.length > 1) {
288-
const fst = found[0];
289-
const sec = found[1];
279+
if (vscode.extensions.getExtension("rust-lang.rust")) {
290280
vscode.window.showWarningMessage(
291-
`You have both the ${fst[0]} (${fst[1]}) and ${sec[0]} (${sec[1]}) ` +
281+
`You have both the rust-analyzer (matklad.rust-analyzer) and Rust (rust-lang.rust) ` +
292282
"plugins enabled. These are known to conflict and cause various functions of " +
293283
"both plugins to not work correctly. You should disable one of them.", "Got it")
294284
.then(() => { }, console.error);
295-
};
285+
}
296286
}
297287

298288
/**

0 commit comments

Comments
 (0)