Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal running in environment #31

Open
jamievicary opened this issue Aug 13, 2020 · 5 comments
Open

Terminal running in environment #31

jamievicary opened this issue Aug 13, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@jamievicary
Copy link

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?

@jamievicary jamievicary added the enhancement New feature or request label Aug 13, 2020
@GuillaumeDesforges
Copy link

This should rather be an option, as sometime you want to get out of the nix-shell to edit it and debug it.

@rvanlaar
Copy link

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.

@paulhdk
Copy link

paulhdk commented Jul 23, 2021

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.

@m1cr0man
Copy link

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 :)

@Kruemmelspalter
Copy link

this is a good workaround for now, but I think it would still be good for the plugin to somehow include this functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants