Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/ts-autocomplete/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ function getVirtualLanguageService(
return fallbackServiceHost?.readDirectory?.(...args) ?? [];
},
directoryExists: (...args) => {
return fallbackServiceHost?.directoryExists?.(...args) ?? false;
// Fallback to true so that it will use the first directory it checks and
// then try and load that file at which point we'll strip the prefix and
// service up the right file from codeHolder.
return fallbackServiceHost?.directoryExists?.(...args) ?? true;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tests we provide a fallbackServiceHost, so it just worked..

},
getDirectories: (...args) => {
return fallbackServiceHost?.getDirectories?.(...args) ?? [];
Expand Down Expand Up @@ -220,9 +223,8 @@ function filterDiagnostics(diagnostics: ts.Diagnostic[]): {
..._.pick(item, 'messageText'),
};

if (result.fileName?.endsWith('shell-api.ts')) {
delete result.text;
}
// this just tends to be way too verbose
delete result.text;

return result;
});
Expand Down