Closed shinichy closed 1 year ago
@ashald Would you take a look?
Incidentally, you don't need to add direnv
to /usr/local/bin
or any other "pointy" location. Creating a .zprofile
(for zsh for example) with proper PATH setup will enable IntelliJ (or any other IDE or Spotlight/Dock launched app from macOS) to obtain a much more usable set of environment variables.
@ashald Do you have a chance to review this PR?
I'd be glad to merge .envrc
support, thought this PR breaks abstraction where core
module is agnostic of intelij. I might get some time to look into fixing it in November, but if you could update it accordingly it'd help get it merged sooner.
@ashald Thank you for reviewing this PR. I updated this PR not to break the core module abstraction. Would you take a look again?
@shinichy ugh, my apologies, I just worked on refactoring some mess in core module to make the interface cleaner. I just submitted a release, and unless there is a critical bug, I don't plan to make any changes to the code. Could you please rebase your changes one more? Apologies for back and forth.
@ashald No worries. I fixed all the conflicts. Could you please take a look again?
Hi @shinichy, apologies for a delayed reply. I was thinking about it for a long time and eventually I realized I would rather not merge in providers that depend on external tools.
What I can offer to you instead is the extension point interface such that you could pack your changes as an independent plugin that relies on extension points provided by EnvFile, but can be installed separately. Please let me know if anything is missing in the current interface that would be necessary for you to implement the above.
P.S.: Alternatively, the latest version of EnvFile can execute any given file and interpret stdout as .env or JSON/YAML. To the best of my understanding, you could wrap a call to direnv in a tiny script that would just output env vars you set.
@ashald Thanks for letting me know. I don't use IntelliJ and direnv these days, so I'll check your suggestions when I have a chance to use IntelliJ again.
Fixes #102
DirenvProvider
to support.envrc
filegetFileNamePredicate
andshowHiddenFiles
methods toEnvVarsProviderFactory
interface to allow selecting only.envrc
file.