Skip to content

Commit

Permalink
fix(language-server): also consider deletions for getRootFiles (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Mar 20, 2024
1 parent 95630c4 commit 03af7d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/language-server/lib/project/typescriptProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ export async function createTypeScriptServerProject(
}
async function onWorkspaceFilesChanged(changes: vscode.FileEvent[]) {

const creates = changes.filter(change => change.type === vscode.FileChangeType.Created);
const createsAndDeletes = changes.filter(change => change.type !== vscode.FileChangeType.Changed);

if (creates.length) {
if (createsAndDeletes.length) {
rootFiles = await getRootFiles(languagePlugins);
}

Expand Down

0 comments on commit 03af7d5

Please sign in to comment.