ashald / EnvFile

EnvFile 3.x is a plugin for JetBrains IDEs that allows you to set environment variables for your run configurations from one or multiple files.
MIT License
539 stars 129 forks source link

Add .env file dialog should start from Run configuration working directory #126

Open 1oglop1 opened 3 years ago

1oglop1 commented 3 years ago

Hi, thanks for the amazing plugin it helps a lot. There is one slight annoyance when enabling EnvFile in a run configuration, the dialogue window to search for the .env file starts in a last used directory. I think it would be much better (if possible) to start the search in Run Configuration working directory.

Expected flow:

  1. Create Run Configuration, Set the working directory /my-run-configuration/directory/ (if not set, start at last known location)
  2. Click EnvFile

image

  1. Click Enable EnvFile
  2. Click Add +
  3. Click .env file or JSON/YAML file

image

  1. Flie browser opens in working directory /my-run-configuration/directory/
ashald commented 3 years ago

I believe I had code to request the file dialog in the project directory. If that's not the case, or if that broke - I'd welcome a PR with a fix!