Skip to content

Commit

Permalink
fix: do not ask client to open file from server
Browse files Browse the repository at this point in the history
to resolve #199
  • Loading branch information
yioneko committed Dec 30, 2024
1 parent 6485ad3 commit 6553bab
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/service/patches/310-fix-randomly-open-file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/typeScriptServiceClientHost.ts b/src/typeScriptServiceClientHost.ts
index 0268e5f..b58be99 100644
--- a/src/typeScriptServiceClientHost.ts
+++ b/src/typeScriptServiceClientHost.ts
@@ -206,12 +206,6 @@ export default class TypeScriptServiceClientHost extends Disposable {
return language;
}
}
-
- // If that doesn't work, fallback to using a text document language mode.
- // This is not ideal since we have to open the document but should always
- // be correct
- const doc = await vscode.workspace.openTextDocument(resource);
- return this.languages.find(language => language.handlesDocument(doc));
} catch {
return undefined;
}

0 comments on commit 6553bab

Please sign in to comment.