Tailwind Autocomplete with PHPStorm (WebStorm) does not work

Problem: If you are creating a Laravel app, for example, and are wondering why PHPStorm or WebStorm is not performing autocompletion for your CSS classes in blade templates or HTML files, it is most likely because the CSS file is too large. For autocomplete to work, PHP-Storm must be able to index the reference file. PHPStorm has a default...

Michael Mai, 20.09.2021

Picture of a beautifully tidy garden

Problem:

For example, if you are building a Laravel app and wondering why PHPStorm or WebStorm does not autocomplete your CSS classes in Blade templates or HTML files, it is most likely because the CSS file is too large.

For autocompletion to work, PHP-Storm must be able to index the reference file. PHPStorm has a default upper limit for processing text files, this is 2.5 MByte.

In my case, the file public/app.css was over 3 MByte in size and was therefore not indexed:

Screen output PHPStorm if a text file cannot be indexed.

Solution:

Extend the border. The following steps are necessary for this:

  1. Increase the upper limit: Help > Custom Properties. A small editor opens
  2. Entry from:
    idea.max.intellisense.filesize=5000

    or the desired upper limit

  3. Restart PHPStorm. Now the CSS file should be indexed and autocomplete is possible again.

See also

No contributions found