ignaaaam's avatar

Tailwind suggestions not showing on Phpstorm 2021.3.2

Hello I'm finishing the Laravel 8 From Scratch course, but during all the course PhpStorm isn't showing the tailwind suggestions while building blade.php pages.

In the course Jeffrey shows us to link tailwind via link:rel on the layout.blade component. Researched a bit but didnt find a solution. I remember with previous versions of PhpStorm and linking tailwind via npm as it says in the documentation did show the suggestions, but linking tailwind with link tag it doesnt. It shouldn't show the suggestions anyways? Someone knows a fix for this or maybe am I missing something in the settings?

The link:rel that i'm using is this one: <link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">

0 likes
5 replies
rajeshtva's avatar

may be you don't have installed plugins for taiwindcss. check for that. in vscode there is one.

ignaaaam's avatar

@rajeshtva I have the "Tailwind CSS", "Tailwind CSS Smart Completions" plugins installed.

rajeshtva's avatar

may be the ide is meant to show classes from cdn css files. only from npm_modules. but still i think there must be some way to add a css file for ide autocompletion. sorry i can't help you with exact solution . i don't use jetbrains ide. only vscode.

comparado's avatar

For autocompletion to function properly, PHPStorm needs to index the reference file. By default, PHPStorm can process text files up to a maximum size of 2.5 megabytes.

Solution for Laravel Projects:

  1. Increase the upper limit: Help > Edit Custom Properties
  2. Insert: idea.max.intellisense.filesize=5000
  3. Restart IDE

Please or to participate in this conversation.