However, it’s currently not possible to modify the environment per-project (instead of globally for the IDE instance) in any of the JetBrains IDEs. The environment that is inherited from the shell is used for every project window in the IDE, and any changes to that environment will be inherited by every project window within that IDE.
There is a GitHub issue for
nix-idea to solve this problem:
NixOS/nix-idea: #1 Add support for nix-shell in JetBrains products
Which references an issue for IntelliJ IDEA that would enable per-project environments, that would enable per-project
IDEA-288756: Common extension point for environment variables
Please vote for this YouTrack issue with your JetBrains account to ensure it gets prioritized.
List of JetBrains IDEs:
- IntelliJ IDEA