Online
Online

Reputation: 53

how can I add bootstrap auto code completion feature in IntelliJ IDE?

I added Bootstrap3 plugin in my IntelliJ IDEA and also added the css and js links in the html page. But I couldnt get the autocompletion for bootstrap class names etc. How can I achieve that?

Upvotes: 5

Views: 6637

Answers (2)

Jean-Paul Abi-Ghosn
Jean-Paul Abi-Ghosn

Reputation: 51

Go to:

Preferences -> Languages & Frameworks -> JavaScript -> Libraries -> Add -> then press '+' -> Attach files -> bootstrap.min.css -> OK

Upvotes: 5

unclebob
unclebob

Reputation: 127

I had the same issue and ended up finding this: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206324479-How-to-activate-autocomplete-with-Bootstrap

trick is that you can't use the cdn delivered css - you have to have it locally referenced.

This line worked for me (html file is in .../resources/templates/ and bootstrap .css file was downloaded to .../resources/static):

<link rel="stylesheet" href="../static/bootstrap.css">

I did have to wait a bit for intellij to index it first.

Hope that helps :)

Upvotes: 4

Related Questions