Merge #9091
9091: Fix opening single files r=SomeoneToIgnore a=SomeoneToIgnore Closes https://github.com/rust-analyzer/rust-analyzer/issues/9082 Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
commit
a127b10d00
@ -45,7 +45,7 @@ async function tryActivate(context: vscode.ExtensionContext) {
|
||||
throw new Error(message);
|
||||
});
|
||||
|
||||
if (vscode.workspace.workspaceFolders?.length === 0) {
|
||||
if ((vscode.workspace.workspaceFolders || []).length === 0) {
|
||||
const rustDocuments = vscode.workspace.textDocuments.filter(document => isRustDocument(document));
|
||||
if (rustDocuments.length > 0) {
|
||||
ctx = await Ctx.create(config, context, serverPath, { kind: 'Detached Files', files: rustDocuments });
|
||||
|
Loading…
Reference in New Issue
Block a user