Closed lk77 closed 3 years ago
Hi, Mathias. Actually, I declare 3 patterns for .env files by default:
.env
*.env
.env.*
The last one should work for you.
Well that's strange, only .env seems to be working, i can mark it as plain text or as .env file, but i don't have the option for the others .env.* files.
The other .env.* files are all white, without highlight
if i rename my .env.testing to .env.* it works. i don't think your patterns works, they are treated as filenames, perhaps an issue with my version of phpstorm i don't know, i'm on 2020.1.2
Exactly. The Javascript plugin made a mistake in 2020.1 and replaced my mapping for .env files. They fixed it immediately.. but maybe your version is still wrong.
ok, i will update my version then, thanks.
I have the same issue with latest PHPStorm 2021.1.1 - env.local
and similar names files have no syntax highlighting. I can see the the filetype patterns, but .env.*
doesn't seem to match.
Any idea where to fix this?
Hello,
i'm now fully updated and it works for me on 2021.1.2
PhpStorm 2021.1.2
Build #PS-211.7142.44, built on April 30, 2021
Can't confirm. I am on the same PHPStorm Version and build.
Plugin version:
.env.local
still has no syntax highlighting.
@dahei what file type do you see for .env.local file(it should be shown in the right bottom corner of editor)? Text? Or?
Then, please, check Editor - File types in the Settings and find this file type. I’m sure the problem is there. “.env.*” pattern usually works if there is no any overriding.
Here are my settings and 2 example files:
@dahei could you check Text file type?
That's it!! - .env.local
was explicitly set there 🤦 . I guess it happened before I installed your plugin (PHPStorm asking for file type as it couldn't know what it was). Sorry for the confusion! All fine!
yeah, you should right click on the file and choose "Mark as '.env file'"
Hello,
it would be great to support all .env files, like .env.testing/.env.local/.env.dusk.local etc...
i think all files starting with .env should be supported.
thanks.