Jochem Gruter
Jochem Gruter

Reputation: 2899

TailwindCSS autocompletion in PhpStorm not working

I just updated PhpStorm to version 2020.3 which now supports autocompletion for Tailwind CSS. But in my new updated version it isn't working and can't figure out why.

In html, blade and css files, there is no autocompletion for Tailwind CSS.

Do I have this enable somewhere? Why isn't it working?

Upvotes: 7

Views: 14630

Answers (8)

Hesham El Masry
Hesham El Masry

Reputation: 423

For anyone still struggling with this issue and hasn't figured out why, the problem is that PhpStorm enters power saving mode. You need to disable it, and then everything will start working again. I discovered this after many hours of troubleshooting.

Upvotes: 0

Mikepote
Mikepote

Reputation: 6553

Just had this issue with a new Vue project, solved it by going to:

Settings -> Languages & Frameworks -> Style Sheets -> Tailwind CSS

And adding the following to the "includeLanguages" section:

      "scss": "scss",
      "html": "html",
      "javascript": "javascript",
      "typescript": "typescript",
      "css": "css",
      "vue": "vue",
      "sass": "sass",
      "twig": "twig"

Seems like it doesnt include all files and languages by default.

Upvotes: 5

Nicolas Facciolo
Nicolas Facciolo

Reputation: 316

I solved the problem by select the node_module folder in libraries configuration :

phpstorm config selection in order to make libs (including tailwind) in node_modules folder used by plugins

Upvotes: 1

Just had the same problem with 2023.1.1 in a javascript project, seems to be an reoccuring problem. Nothing helped, not reinstalling tailwindcss or removing .idea. I couldnt even update the IDE because of its bugged update feature. Had to uninstall it and download the new version 2023.1.4, then it worked.

Upvotes: 1

habibun
habibun

Reputation: 1630

I solved by downloading the tailwindcss library.

setting

download

Upvotes: 7

mousa aghahoseini
mousa aghahoseini

Reputation: 21

To fix the problem, update to version 2021.3.1. Do not look for another solution because it does not exist enter image description here

Upvotes: 2

cifuentes
cifuentes

Reputation: 1249

if you are using a node version manager check that your project Language & Frameworks configuration for Node.js and NPM is actually using the same node version where you installed tailwind and postCSS packages

Upvotes: 3

Jochem Gruter
Jochem Gruter

Reputation: 2899

Looks like there is an bug when using npm installer and when you are using version npm:@tailwindcss/postcss7-compat@^2.0.1 of tailwind.

source https://youtrack.jetbrains.com/issue/WEB-48473

My solution: delete node_modules and use yarn install

Upvotes: 6

Related Questions