简体   繁体   English

PhpStorm - 所有文件都有蓝色字体(没有方法/属性的颜色编码)

[英]PhpStorm - all files have blue font (no color coding for methods/properties)

I created a new project using Laravel's command composer create-project --prefer-dist laravel/laravel blog 我使用Laravel的命令composer create-project --prefer-dist laravel/laravel blog创建了一个新项目composer create-project --prefer-dist laravel/laravel blog

When I open it in PhpStorm, all the files look like this: 当我在PhpStorm中打开它时,所有文件看起来像这样:

蓝色字体

I haven't done anything at all but any file I open has the same color text and when I type anything I get no text suggestions. 我没有做任何事情,但我打开的任何文件都有相同的颜色文本,当我输入任何内容时,我都没有文字建议。

Has anyone had this issue before? 以前有人有这个问题吗?

PS Valet works and I can run the project in localhost. PS Valet工作,我可以在localhost中运行该项目。

I'll hazard a guess that somehow your files aren't being associated with PHP. 我猜想你的文件不会与PHP相关联。 You can reset this in settings by making sure that files ending in .php are recognized by PHPStorm as PHP files: 您可以通过确保以.php结尾的.php被PHPStorm识别为PHP文件来重置此设置:

PHPStorm文件类型界面

Image of PHPStorm 2018.1 PHPStorm 2018.1的图片

In settings, go to Editor -> File Types -> PHP and make sure that *.php (or whatever your exotic PHP extension is) is present. 在设置中,转到编辑器 - >文件类型 - > PHP ,并确保*.php (或任何您的奇特PHP扩展名)存在。 Hit Apply. 点击申请。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM