Skip to content

Commit a5990b7

Browse files
hnraHenrik Andersson
andauthored
Provide strict quick info in plugin (#69)
Co-authored-by: Henrik Andersson <[email protected]>
1 parent ca60100 commit a5990b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/plugin/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ const init: ts.server.PluginModuleFactory = ({ typescript }) => {
3333
strictLanguageService.dispose();
3434
info.languageService.dispose();
3535
};
36+
proxy.getQuickInfoAtPosition = function (filePath, position) {
37+
const strictFile = new PluginStrictFileChecker(info).isFileStrict(filePath);
38+
39+
if (strictFile) {
40+
return strictLanguageService.getQuickInfoAtPosition(filePath, position);
41+
} else {
42+
return info.languageService.getQuickInfoAtPosition(filePath, position);
43+
}
44+
};
3645

3746
return proxy;
3847
}

0 commit comments

Comments
 (0)