IntelliJ CSS autocomplete for node_modules -> Bootstrap
I am struggling to enable autocomplete for Bootstrap in IntelliJ Ultimate with a NodeJS/ReactJS project.
Setup:
I have a node_modules folder with several node modules installed.
Bootstrap was installed with npm install --save twbs/bootstrap#v4-dev.
I have also an index.html file with the Link Tag for referencing the Bootstrap file.
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="./style/style.css">
Problem:
In my ReactJS files I want to autocomplete Bootstrap class names. But cannot. However, styles.css is autocompleted.
Observation:
If I _move_ the bootstrap.css out of the node_modules folder ANYWHERE else, then IntelliJ will happily suggest autocompletion for Bootstrap classes, regardless if i referenced it in index.html with a link tag or NOT!
What I want:
I want that IntelliJ shows autocomplete suggestions for Bootstrap classes even the css is buried deep inside the node_module folder.
Cheers Rene
Please sign in to leave a comment.
works for me.
What IDEA version do you use? may be related to https://youtrack.jetbrains.com/issue/WEB-23851
IntelliJ 2016.2.5.
I am going to download the newest version.
Which version are you using?
Thanks for the Link. I just have updated to the new version 2016.3 and IT WORKS !!!
If you want to get the word autocomplete, you need to import the Framework into your IDE. I had the same problem, after several attempts I managed to import Bootstrap. I am using Web Storm, version WS-173.4127.31 of 26 December 2017.
To import your Framework you must follow the following path:
File > Settings_.. > Languages & Frameworks | From here you decide how to organize yourself.
For example, I did the following steps to import Bootstrap:
Languages & Frameworks> Template Data Languages
Here I set:
1. Project Language: CSS
2. Click on the +
3. I selected bootstrap.min.css
4. Click on OK
After a few seconds I managed to have the autocompletion of the words!