adelf / idea-php-dotenv-plugin

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

Add support for .env.dist files #5

Closed Haehnchen closed 6 years ago

Haehnchen commented 7 years ago

Also support .env.dist for ENV variables. eg see https://github.com/symfony/flex/blob/master/src/Flex.php#L177

adelf commented 7 years ago

As I see all these kind of files usually copied to .env (Laravel has .env.example file). And usually both of this file with similar content are in project. This makes Go to declaration feature unconvenient - user should every time choose between .env and .env.dist file declaration. I'll try to avoid these issues in future.. maybe. But currently I'll support only .env files.

kAlvaro commented 7 years ago

Other files (.env-development, .env-production...) should probably only taken into account in other features (see #2).

adelf commented 7 years ago

image Actually, you can add any files to .env File type. And everything will work.

image

But after that any Go to declaration call will be with annoying choice...

adelf commented 6 years ago

I added .env.* files support. But they will work only if there is no main .env file in the project. Or, for example current key, which user wants to Go To Declaration, exists only in .env.dist files, when plugin redirects user to declaration in .env.dist file.

jezmck commented 6 years ago

Yep, we have .env.local, .env.production etc, so we need the wildcard option to work.

adelf commented 6 years ago

@jezmck it has. .env.* by default. and it can be configured in File types setting. Implemented in 0.7.

jezmck commented 6 years ago

~It seems that having both stops the wildcard working.~

Apologies, I had at some point added the others to text files, individually, without the wildcard