mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Fix opening single files
This commit is contained in:
parent
7c1d8ca635
commit
60e7817e9c
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue