-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Angular Language Service in HTML files #2102
Add support for Angular Language Service in HTML files #2102
Comments
Actually for external templates, it seems you need to use the separate server, not the plugin. https://github.com/angular/vscode-ng-language-service/tree/master/server Which in turn, starts a separate tsserver + plugin. npm WARN notsup Unsupported engine for @angular/language-server@0.1001.1: wanted: {"node":">=10.9.0 <13.0.0"} (current: {"node":"15.1.0","npm":"6.14.8"}) Trying anyway results in: (Just posting my notes, haven't looked into it further, yet.) |
I would love to know how to get this to work with as little friction as possible. I would like it to just work automatically, provided you have the right configuration. I'm using Angular for my day job, and at the moment all of our templates are embedded in |
Any ETA on this? I'm trying to move from coc to ale (way faster from my experience so far). I normally work with angular and this really is a really good feature for my use case. |
I'll give it a go. I don't need it for work just yet, but eventually I will need it. |
It looks like the first stable LSP server version is for Angular 11, so that's probably the minimum version we should try to support. I got as far as figuring that out before I had to stop looking for now. |
I've got a working version of it locally now I tested with my own codebase, and it also led to fixing a breaking change in Language Server Protocol where different data can be returned for "go to X" requests, or maybe just a bug in the Angular language server where it returns that data without the client saying it can support it. I'll add some tests for it when I next have some spare time and add it in. As I thought, Angular 11 will be the minimum version I'll support because it seems to be the first version that's stable enough to be worth supporting. |
I've added a linter file for the Angular language server now. Only Angular 11 and up are supported, and you need to install the language server. npm install --save-dev @angular/language-server It works pretty well with my work codebase. Enjoy! |
* master: (214 commits) improve DMD handler (dense-analysis#3647) Add support for V: "v" (compiler) and "vfmt" fixer. (dense-analysis#3622) Add nixfmt as a Nix fixer. (dense-analysis#3651) Switch to using buildifier's -path option (dense-analysis#3640) Add support for `ptop` fixer (dense-analysis#3652) Add more parameters to the DMD linting command (dense-analysis#3639) dense-analysis#3633 - Move linter tests into test/linter Allow more time before PRs become stale Add support for clangd with CUDA (dense-analysis#3598) add support for svelte via svelteserver language server (dense-analysis#3644) dense-analysis#3633 - Put all dummy test files in test/test-files Add desktop-file-validate Fix a typo in a test filename issue 3033 (dense-analysis#3620) dense-analysis#3632 Add ale#util#MapMatches Fix ale#path#Dirname on Windows Disable blank issues and add a link to ask for help Check user systemd unit files with systemd-analyze Close dense-analysis#2102 - Add support for the Angular language server Fix texlab#GetProjectRoot (dense-analysis#3610) ...
Name: Angular Language Service
URL: https://angular.io/guide/language-service
Angular Language Service is a plugin for TSServer that enables autocompletion in HTML for Angular component files using the
@angular/language-service
NPM package.In this case, as it is a plugin of TSServer, I think the solution would be that in projects that have
angular.json
files in their root, TSServer should be enabled for HTML files.The text was updated successfully, but these errors were encountered: