diff --git a/packages/service/patches/310-fix-randomly-open-file.patch b/packages/service/patches/310-fix-randomly-open-file.patch new file mode 100644 index 0000000..d3522c7 --- /dev/null +++ b/packages/service/patches/310-fix-randomly-open-file.patch @@ -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; + }