Autocomplete not working for html attributes

All of a sudden autocomplete does not predict html attributes like class, name, placeholder. It works with aria-label etc just not the aforementioned.

I do not have power saving mode enabled and cannot find how to switch this feature on. 

Do I need a plugin?

0
11 comments

Hi there,

What custom (not bundled by default) plugins do you have? It can be caused by one of such plugins...

0

PhpStorm version info...

PhpStorm 2021.2.3
Build #PS-212.5457.49, built on October 13, 2021
Runtime version: 11.0.12+7-b1504.40 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 7 6.1
GC: ParNew, ConcurrentMarkSweep
Memory: 2014M
Cores: 4
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: some.awesome (1.14), com.kalessil.phpStorm.phpInspectionsEA (4.0.7.1), ru.adelf.idea.dotenv (2021.3.0.212), de.espend.idea.laravel (0.15.4), com.laravel_idea.plugin (4.4.6.212)

 

I have the same on my PC at home, but there is no problem there. This just started out of the blue.

It does not autocomplete the word class..

0

TBH -- no solid clues. You do not have any weird plugins that I think could make it...

Can you switch to the default light theme (or default Darcula) and make a screenshot of the whole editor window with that tag visible. The colors used can give visual clues. Maybe some rogue injection rule (it's hard to judge anything from a limited static screenshot)...

Does it work OK in another file? In another type of file (e.g. .php that has HTML). Different tags?

I have the same on my PC at home, but there is no problem there. This just started out of the blue.

How's your home IDE config different to this one?

The same project or different ones?

Try the following:

"File | Manage IDE Settings | Restore Default Settings..." -- it should make a backup before resetting them (so you can rollback to the old config if it will not make any diff). Or you may make a manual backup (while the DIE is closed): https://www.jetbrains.com/help/phpstorm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory (NOTE: the path will be slightly different if you sync the IDE settings via JB Account or perhaps when the IDE was installed via JetBrains Toolbox App).

If it works fine in one project and does not in another -- try recreating the project from scratch: exit the IDE, go to PROJECT_ROOT/.idea , backup and delete this folder, launch the IDE again -- may need to use "Open" and point to the project root so the IDE will make the new project from existing files. Configure it a bit (so it does the main things related to editing) -- any better? If yes -- you may restore some of the config files from backup (while project is closed in the IDE).

0

Here is a screenshot with Classic Light...

Sidenote: Never really understood default themes with all the different background colours for different code. Its not very nice to look at.

0

How's your home IDE config different to this one?

The same project or different ones?

I have Windows 10 at home running the same projects. Things is though this has only just started. Its been working for a few years until a few weeks ago. Strangely though I cannot sync setting here at work on my windows 7 machine. There is no options to sync settings to cloud as I do at home.

0

Does it work OK in another file? In another type of file (e.g. .php that has HTML). Different tags?

This is not working is Laravel Blade PHP files. I just created an HTML scratch file and its working ok...

0

The same project or different ones?

Sorry I have just realised this is not happening in all projects. I just tried 3 other projects and it ok in one of them.

Deleting the .idea file has fixed my issue. 

Edit: Just to be clear, I didn't "File | Manage IDE Settings | Restore Default Settings..." first. I just deleted my .idea directory then recreated the project and then it worked.

Thanks for your time Andriy

0

@Ben Taylor

What's your IDE version BTW?  Accordingly to https://youtrack.jetbrains.com/issue/WI-63186 this has been fixed in 2021.3

Sorry I have just realised this is not happening in all projects. I just tried 3 other projects and it ok in one of them.

Deleting the .idea file has fixed my issue.

Nice. Glad you have it sorted.

Strangely though I cannot sync setting here at work on my windows 7 machine. There is no options to sync settings to cloud as I do at home.

Check the plugins/their config. There are 2 that can sync your settings to/from the cloud (different ones):

  1. IDE Settings Sync (does it with JetBrains Account)
  2. Settings Repository (does it with your VCS)
0

What's your IDE version BTW?

2021.2.3

Check the plugins/their config. There are 2 that can sync your settings to/from the cloud (different ones):

I cannot see any config setting for the two bundled plugins

 

On my PC at home when I click IDE setting there is a setting you click and it gives you an options to either push to pull setting from cloud? But here at work that is not there? I have never been able to sync from work PC. I have not setup a repo in github for this so I am not quite sure how you do this as the setting at work are not the same as home

Clicking import setting here only allows me to import setting from previous installations on this pc.

 

0

I cannot see any config setting for the two bundled plugins

Check under the "Settings | Tools" -- I would imagine them to be there (I do not use any of them (have them disabled) so cannot check them for you).

The rest you can read here: https://www.jetbrains.com/help/phpstorm/sharing-your-ide-settings.html

2021.2.3

Consider upgrading to the latest version where that issue has been fixed (as per aforementioned ticket number)

P.S. Do not upgrade if you use WSL -- current version has an issue there (https://youtrack.jetbrains.com/issue/IDEA-286059). In this case better wait for next minor 2021.3.2

0

I have now upgraded to the latest version.

The rest you can read here: https://www.jetbrains.com/help/phpstorm/sharing-your-ide-settings.html

I have tried to get the setting to show "Sync Settings to JetBrains Account" in File | Manage IDE Settings but I simply cannot make that show.

The only way I can make the dialog prompt for "Get Settings from Account" or "Keep and Sync Local Settings." is by disabling and then re enabling sync settings.

I have created a new post for this issue as I have gone through the docs and googled the specific issue to no avail.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/4415273570066-Sync-Settings-to-JetBrains-Account-is-missing-from-File-Manage-IDE-Settings

0

Please sign in to leave a comment.