adelf / idea-php-dotenv-plugin

environment parameters completion, based on .env file keys
MIT License
166 stars 13 forks source link

PHPStorm 2020.1 - .env.* not highlighting #53

Closed pmcgoverncw closed 4 years ago

pmcgoverncw commented 4 years ago

Since installing PHPStorm 2020.1, .env.* files are not highlighting (ex: .env.local)

Screen Shot 2020-04-14 at 12 21 19 PM Screen Shot 2020-04-14 at 12 21 48 PM Screen Shot 2020-04-14 at 12 22 10 PM Screen Shot 2020-04-14 at 12 22 49 PM Screen Shot 2020-04-14 at 12 23 08 PM

adelf commented 4 years ago

https://youtrack.jetbrains.com/issue/WI-52299

jezmck commented 4 years ago

You'll need to remove any .env matching patterns from the Text file type in Preferences > Editor > File Types.

adelf commented 4 years ago

Yes. Thank you. Jetbrains made a little mistake and all these Text file type linkings will be removed in the next version 2020.1.1 . But it can be fixed manually in Settings | Editor | File types | Text - and remove all .env.* from there.

dmydlo commented 4 years ago

Note: If for you it still doesn't work, you might (as I had) have an additional type of files "Env" besides ".env" which comes from EnvFile plugin.

pmcgoverncw commented 4 years ago

Thanks everyone - I was able to remove it from the text file types and all is well now. Anyone know if there are plans for native .env support/highlighting in PHPStorm?

adelf commented 4 years ago

Anyone know if there are plans for native .env support/highlighting in PHPStorm?

Whats wrong with this plugin? :)

pmcgoverncw commented 4 years ago

@adelf Nothing at all - but the more prevalent some features become, the more they should be considered for direct integration into the IDE. Multiple widely-adopted PHP frameworks are natively using .env files, so it makes sense to have native support in a PHP IDE. (and if I missed any sarcasm... sorry lol)

adelf commented 4 years ago

One of the main conceptions of IntelliJ IDE's are plugins. This plugin makes completion for environment variables for PHP, Ruby, Python, Go and Javascript languages. So, if JetBrains decide to implement something in their side, implementation will be very close to this plugin :)

pmcgoverncw commented 4 years ago

I would argue further, but PHPStorm auto-suggests relevant plugins when it detects use for them, so I have no argument. :)