Skip to content

Commit 3f36b47

Browse files
authored
(fix) make TS plugin completions work again
Probably went broke as part of the external files change because they are now found earlier
1 parent b43bc68 commit 3f36b47

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/typescript-plugin/src/language-service/completions.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ export function decorateCompletions(ls: ts.LanguageService, logger: Logger): voi
4747
preferences,
4848
data
4949
);
50-
if (details || !isSvelteFilePath(source || '')) {
50+
if (details) {
51+
if (isSvelteFilePath(source || '')) {
52+
logger.debug('TS found Svelte Component import completion details');
53+
return replaceDeep(details, componentPostfix, '');
54+
} else {
55+
return details;
56+
}
57+
}
58+
if (!isSvelteFilePath(source || '')) {
5159
return details;
5260
}
5361

0 commit comments

Comments
 (0)