8 ms·
> I have another that cd into a project and launch the dev environment. I have this set up with direnv[1] and it's incredibly useful, especially with Emacs int
by tikhonj 4y ago
> I have another that cd into a project and launch the dev environment.
I have this set up with direnv[1] and it's incredibly useful, especially with Emacs integration. Not only does it reduce the cognitive burden of keeping track of whether I've opened a venv/launched a nix shell/etc, but it also prevents time-wasting mistakes like launching the wrong version of an interpreter or compiler.
[1]: https://direnv.net/ https://direnv.net/
- actinium226 4y agoI guess my solution to this problem is not very popular - I try to keep my dev environment simple enough that I don't need venv or anything like that. I find that venv or docker adds cognitive load that then needs more tools to unload, like direnv. So if my devenv gets too complicated I try to simplify it. Seems like a logical solution to me but often I run into people who simply don't believe me that it makes things simpler. :shrug:
- nicbou 4y agoAt some point your code has dependencies that call for this.
- satvikpendem 4y ago> I guess my solution to this problem is not very popular - I try to keep my dev environment simple enough that I don't need venv or anything like that. I find that venv or docker adds cognitive load that then needs more tools to unload, like direnv. Good for you but this doesn't work in most scenarios, especially if you work in a company with a build process.
- codemonkey-zeta 4y agoI'm really interested in setting this up also. Can you briefly explain how you set this up with direnv? Looks like that's just for loading environment files, not launching processes?
- ywei3410 4y agoEmacs launches processes on the `PATH` so using `direnv`, you can change the `PATH` to the version of `rust-analyzer`/`gopls`/`python`/`psql`/`protoc` that you're using as well as setting the correct load paths for each language.