You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using @angular/language-service with language server report errors with HTML files #104
Hi, I am trying to integrate @angular/language-service plugin with the language server via the global plugins initializationOptions. This works with template inside Typescript files, but not with templates as html files. If I execute the language server with HTML content types, it reports a bunch of typescript errors.
Is there any options to disable the errors while enabling the @angular/language-service for HTML files?
I've reported it upstream as I think it's an issue that tsserver even tries to parse the .html file if there is no plugin instructing it to do it: microsoft/TypeScript#31423
If I execute the language server with HTML content types, it reports a bunch of typescript errors.
I think this is the core issue. If you don't execute the language server with html files, it won't report issues for them. To my knowledge, most client language server implementations require you to specify which languages/syntaxes to apply the language server to - Sublime text, Nova as two examples - so something in your setup is instructing language-service-plugin to process HTML files without any real support for it.
In this case though, I'd need much more detail to know how Eclipse/@angular/language-service/language-service-plugin are working together to try to understand this issue.
Activity
mickaelistria commentedon May 16, 2019
I've reported it upstream as I think it's an issue that tsserver even tries to parse the
.htmlfile if there is no plugin instructing it to do it: microsoft/TypeScript#31423apexskier commentedon Jul 5, 2021
I think this is the core issue. If you don't execute the language server with html files, it won't report issues for them. To my knowledge, most client language server implementations require you to specify which languages/syntaxes to apply the language server to - Sublime text, Nova as two examples - so something in your setup is instructing
language-service-pluginto process HTML files without any real support for it.In this case though, I'd need much more detail to know how Eclipse/
@angular/language-service/language-service-pluginare working together to try to understand this issue.rchl commentedon Nov 21, 2021
I've investigated this a bit.
The typescript plugin doesn't support HTML files, only inline templates in TS files.
https://github.com/angular/vscode-ng-language-service also includes a dedicated language server that supports HTML templates also. I believe they only provide VSCode extension but if you search a bit you might be able to find server adapted for your editor. For example there is https://github.com/sublimelsp/LSP-angular for Sublime Text.