Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Template IntelliSense

I use C# mostly and one thing that I am missing in VSCode is IntelliSense in Angular 2 templates.

I found that there is a solution to this problem here, but I couldn't find a way to integrate it into Visual Studio Code.

I need this: enter image description here

Is there any way to get IntelliSense in Visual Studio Code for Angular 2 templates?

like image 354
coder Avatar asked Nov 14 '16 13:11

coder


2 Answers

Anyone who is looking for this functionality, there is an extension Angular Language Service VS Code extension.

like image 67
coder Avatar answered Sep 22 '22 03:09

coder


That page you linked details the installation steps:

Usage in VSCode:

  1. Replace the typescript.tmLanguage file under the install location at Contents/Resources/app/extensions/typescript/syntaxes with the version from the TypeScript-TmLanguage repo above (from the ngml branch).

  2. Fork the TypeScript repo above, checkout the ngml branch, and build.

  3. Open the VSCode global settings, and set the typescript.tsdk property to the build location in the prior step (e.g. /src/typescript/built/local).

  4. To get completions within the template on characters such as <, [, etc. open typescriptMain.ts from the Contents/Resources/app/extensions/typescript folder under the VSCode install location, and change the line that calls registerCompletionItemProvider to read vscode_1.languages.registerCompletionItemProvider(modeID, completionItemProvider, '.', '<', '(', '[', '\'');

  5. To make changes edit the local TypeScript repo, rebuild, and relaunch VSCode.

Right now, it doesn't look like there's an extension for it, yet - likely due to gaps in the extension API which are currently in development.

like image 29
Levi Fuller Avatar answered Sep 24 '22 03:09

Levi Fuller