Closed jmgilman closed 1 year ago
Not 100% sure, but if you replaced node via services.vscode-server.nodejsPackage
with say a script that runs node through a development shell, vscode would have the environment of that node, so als long as your script has a /bin/node that is executable and eventually runs node proper, it might work out? Just brainstorming.
i am using https://github.com/nix-community/lorri and this extension https://github.com/direnv/direnv-vscode
e.g put some minimal shell.nix
with dependencies, then run lorri init && direnv allow
in project dir. extension will prompt to reload using this env
Looks promising. I already use direnv
but use the flake support for loading my devshell. Tried installing that extension and reloading but it didn't appear to do anything. Might not be supported.
ah sorry, linked wrong extension: https://github.com/direnv/direnv-vscode
Ah, yeah I realized the other hadn't been updated in 7 years 😅
That one did the trick, thanks for the suggestion!
This is less of an issue and more of a general question. Is there a way to make the remote vscode server pickup the environment from a development shell? When attempting to do, for example, Python work, the IDE constantly complains about missing packages. The only recourse is to install them globally on the NixOS machine, which isn't really a viable option.
Any thoughts?