vscode-ng-language-service: Bug: Autocomplete No Longer Works With Angular 6

With my current project that I have upgraded since Angular 2, the plugin’s autocomplete no longer works with Angular 6. The plugin is able to provide errors, hints, and navigation only after the variable has been fully typed and a few seconds have passed.

I just created a brand new project with ng new my-app, opened the project in VS Code and installed the plugin and I get the same behavior, autocomplete not working.

Also not getting any autocomplete for the Material CDK. For example cdkConnectedOverlay as shown here

https://youtu.be/kYDLlfpTLEA?t=612

Angular CLI: 6.0.5 Angular: 6.0.3 Typescript: 2.7.2

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 19
  • Comments: 38 (2 by maintainers)

Most upvoted comments

v0.1.10 is out with angular-language-service 6.1 and TS 2.7, thanks @kyliau

That’s a feature of VS Code as methods and properties are autocompleted from imported packages. This works even with Angular Language Service disabled.

check the VSCode output logs. I had an issue with my JSON file that was not readily apparent. click output then select angular language services in the drop down and you should see why it did not work: image

I had the same problem with the extension not working but I have it working now. What helped me was a suggestion of my friend to check out the logs of the extensions. I didn’t find them but this eventually guided me to “Help -> Toggle Developer Tools”. It opened devtools just like in Chrome and in the “Console” tab there was an error coming from the extension. The error was something like “The language client requires VS Code version ^1.26 but received version 1.25.1”. After updating the VS Code itself the problem disappeared and the extension is working now.

Same happening here. Is there any way to downgrade the extension?

The project I’m currently working on where I’m having this issue was created by the CLI with ng new APP.

@parion If you create a new project with ng new my-app does the autocomplete work for you? Because the project where autocomplete works I created it not too long ago and it uses Angular 6.0.3 and Typescript 2.7.2 The project where autocomplete doesn’t work I upgraded from Angular 4 to 5 to 6.

some project can work some can’t.Why?