4 ms·
Yes, most Nix users employ https://direnv.net https://direnv.net or the equivalent for your IDE of choice. Emacs for instance has https://github.com/purcell/env
by nextos 3y ago
Yes, most Nix users employ https://direnv.net https://direnv.net or the equivalent for your IDE of choice. Emacs for instance has https://github.com/purcell/envrc https://github.com/purcell/envrc which set per-buffer variables.
More background in https://github.com/direnv/direnv/wiki/Nix https://github.com/direnv/direnv/wiki/Nix.
- rgoulter 3y agoThat said, I believe VSCode (and some IDEs) don't necessarily support direnv in all cases.. e.g. you'd want direnv to load before other plugins (and update the PATH), but might not get that.
- angio 3y agoIf you start vscode with `code .` after entering the nix shell it will work in most cases.