I'm trying to get WebStorm to autocomplete some HTML attribute values while working with Angular Material.
Editor > Inspections > HTML > Unknown HTML tag attribute
I added some attributes here like flex
, flex-md
and layout
, but how can I get autocomplete for a situation like below?
<div layout="can be row or column"></div>
A layout's value is either a row
or column
, so I want row and column to appear when I type layout="row/column here", is it possible?
I'm using WebStorm 12 EAP.
Start typing. By default, IntelliJ IDEA displays the code completion popup automatically as you type. If automatic completion is disabled, press Ctrl+Shift+Space or choose Code | Code Completion | Type-Matching from the main menu. If necessary, press Ctrl+Shift+Space once again.
Intelligent code completion uses an automatically generated in-memory database of classes, variable names, and other constructs that given computer code defines or references.
I have tried the following according to this thread (Intellij IDEA CE 12 Android XML Code Completion not working): Go to File->Power Save Mode and disable it - it is off. Go to Preferences->Editor->Code Completion and check Autopopup code completion - this has been checked. Go to File->Invalidate Caches and restart.
Code completion is one of the essential features of the WebStorm editor. To show you completion suggestions, WebStorm goes through the project files with the source code and adds classes, methods, functions, and variables defined in them to a special internal index.
I've done some research too, but found nothing answering this question. Looks like you just can add custom tag, which will be automatically completed, e.g. tolayout=""
, but not their value.
You can't change the behaviour of autocompletion at the moment, see this old ticket
Well, you can try to import. In the TypeScript context, WebStorm can generate import statements for modules, classes, and any other symbol that can be exported and called as a type.
Here's link from official documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With