mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +00:00
ForGoT tO RuN prEttIeR¿
This commit is contained in:
parent
16a0eb1829
commit
dcbbb7f211
1 changed files with 3 additions and 3 deletions
|
@ -51,14 +51,14 @@ async function tryActivate(context: vscode.ExtensionContext): Promise<RustAnalyz
|
||||||
// We only support local folders, not eg. Live Share (`vlsl:` scheme), so don't activate if
|
// We only support local folders, not eg. Live Share (`vlsl:` scheme), so don't activate if
|
||||||
// only those are in use.
|
// only those are in use.
|
||||||
// (r-a still somewhat works with Live Share, because commands are tunneled to the host)
|
// (r-a still somewhat works with Live Share, because commands are tunneled to the host)
|
||||||
const folders = (vscode.workspace.workspaceFolders || []).filter((folder) =>
|
const folders = (vscode.workspace.workspaceFolders || []).filter(
|
||||||
folder.uri.scheme == "file"
|
(folder) => folder.uri.scheme === "file"
|
||||||
);
|
);
|
||||||
const rustDocuments = vscode.workspace.textDocuments.filter((document) =>
|
const rustDocuments = vscode.workspace.textDocuments.filter((document) =>
|
||||||
isRustDocument(document)
|
isRustDocument(document)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (folders.length == 0 && rustDocuments.length == 0) {
|
if (folders.length === 0 && rustDocuments.length === 0) {
|
||||||
// FIXME: Ideally we would choose not to activate at all (and avoid registering
|
// FIXME: Ideally we would choose not to activate at all (and avoid registering
|
||||||
// non-functional editor commands), but VS Code doesn't seem to have a good way of doing
|
// non-functional editor commands), but VS Code doesn't seem to have a good way of doing
|
||||||
// that
|
// that
|
||||||
|
|
Loading…
Reference in a new issue