Ole
Ole

Reputation: 47212

automcompleting material elements in vscode?

I'm going through this youtube tutorial and when the author types in a custom material element vscode will autocomplete it when he hits return.

When I type and hit return this does not happen. How do we enable this?

Upvotes: 1

Views: 3066

Answers (1)

Shaun Luttin
Shaun Luttin

Reputation: 141712

If you are already seeing suggestions, there is a setting for accepting suggestions with enter, which we can enable in the user settings:

"editor.acceptSuggestionOnEnter": "on",

For TypeScript files, if you are not seeing suggestions, you might need to install the packages that power the suggestions.

After running these commands...

npm init -y                            // init node project
npm install angular --save             // install angular 
npm install @types/angular --save-dev  // install angular types
npm install @angular/material --save   // install material
tsc --init                             // init TypeScript project
code .                                 // open VS Code

...this is what I see in my VS Code instance.

enter image description here

For HTML files, you might need to install and enable the Angular Language Service VS Code Extension.

enter image description here

Upvotes: 3

Related Questions