Skip to content

Commit 426f551

Browse files
committed
fix glint crashing errors
1 parent 4393eb5 commit 426f551

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/core/src/volar/language-server.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,15 @@ connection.onInitialize((parameters) => {
3939
// so it might not buy us much value any more.
4040
const configLoader = new ConfigLoader();
4141
const glintConfig = configLoader.configForFile(configFileName);
42-
assert(glintConfig, 'Glint config is missing');
43-
languagePlugins.unshift(createGtsLanguagePlugin(glintConfig));
42+
43+
// TODO: this causes breakage if/when Glint activates for a non-Glint project.
44+
// But if we don't assert, then we activate TS and Glint for non TS projects,
45+
// which doubles diagnostics... how to disable the LS entirely if no Glint?
46+
// assert(glintConfig, 'Glint config is missing');
47+
48+
if (glintConfig) {
49+
languagePlugins.unshift(createGtsLanguagePlugin(glintConfig));
50+
}
4451
}
4552

4653
return languagePlugins;

0 commit comments

Comments
 (0)