Search code examples
htmlcsslaravelphpstorm

PhpStorm CSS completion stopped working (Ctrl + Space gives me no suggestions) in Blade files


I am working on a Laravel project with vanilla Blade templates, jQuery & Bootstrap.

After the recent update, I am no longer getting CSS class auto-completions for Bootstrap in my Blade view:

enter image description here

I have tried the following:

  • Invalidate the cache
  • Reset the .idea folder (fresh import)
  • Marked the resource root folder correctly
  • Checked to see if power save mode is disabled
  • Tried installing the Laravel plugin

The CSS files are brought into my view/layout using the Laravel's asset() helper like this:

<link href="{{ asset('plugins/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/app-style.css') }}" rel="stylesheet"/>

Is there a way to tell PhpStorm to do code suggestion from my project's resource root? It doesn't seem to introspect my CSS files when imported like this, strangely this worked before in the older version of the PhpStorm.


Solution

  • It is a bug in PhpStorm 2024.1. https://youtrack.jetbrains.com/issue/WI-76922

    It has been fixed already and will be available in the next minor update 2024.1.1 (later this month, on or around April 23 AFAIK).


    If this feature is critical for you, consider downgrading to 2023.3.6 for the time being: https://www.jetbrains.com/phpstorm/download/other.html

    UPDATE 2024-04-20:
    2024.1.1 Preview build with the fix is now available. It can be installed via JetBrains Toolbox App.