Skip to content

Commit

Permalink
fix: handle LSP given incorrect name casing file name
Browse files Browse the repository at this point in the history
close #1125, close #1592
  • Loading branch information
johnsoncodehk committed Jul 19, 2022
1 parent 834a866 commit 302b573
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vue-language-server/src/projects.ts
Expand Up @@ -370,8 +370,9 @@ function createWorkspace(
function findDirectIncludeTsconfig() {
return findTsconfig(async tsconfig => {
const parsedCommandLine = await getParsedCommandLine(tsconfig);
const fileNames = new Set(parsedCommandLine.fileNames);
return fileNames.has(fileName);
// use toLowerCase to fix https://github.com/johnsoncodehk/volar/issues/1125
const fileNames = new Set(parsedCommandLine.fileNames.map(fileName => fileName.toLowerCase()));
return fileNames.has(fileName.toLowerCase());
});
}
function findIndirectReferenceTsconfig() {
Expand Down

0 comments on commit 302b573

Please sign in to comment.