Open jamievicary opened 4 years ago
This should rather be an option, as sometime you want to get out of the nix-shell to edit it and debug it.
An idea, document the behavior. I'm rather new to nix pkgs. My first thought that the extension was broken since the packages weren't available in the terminal.
Please correct me if I'm wrong, but a workaround could be to set up direnv in the project folder. That way, every time one enters the project directory via the VS Code terminal, nix-shell is started. At least it seems to be working for me.
Another simple solution I found is to add a custom terminal profile. Here's an example you can drop into your code-workspace config:
{
"settings": {
"terminal.integrated.profiles.linux": {
"Nix Shell": {
"path": "nix-shell",
"icon": "terminal-linux",
},
},
"terminal.integrated.defaultProfile.linux": "Nix Shell"
}
}
There is that couple second delay when you open a window from running nix-shell but it's not nearly as bad as waiting for it to open then running nix-shell yourself :)
this is a good workaround for now, but I think it would still be good for the plugin to somehow include this functionality
I've got this working, but when I want to build manually I still need to write "nix-shell" in the terminal by hand, it seems. Could this not be done automatically by the extension?