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

Add command :NixShell #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add command :NixShell #48

wants to merge 2 commits into from

Conversation

Julow
Copy link

@Julow Julow commented Nov 12, 2022

Add a command to call 'nix-shell' and then update the editor's environment as if it was inside the new shell.

It's sometimes useful to fire up a nix-shell just to download a package for using it once. It's annoying however when it's a library or any other dependency of ':make', which can't be called from inside the shell.

Example:

:NixShell -p hello
:term hello

There's no rollback command but it could be written if it's ever needed. Calling the commande several times will nest environments the same way as opening a shell inside a shell.

@Ma27
Copy link
Collaborator

Ma27 commented Jul 29, 2023

Isn't this effectively what https://github.com/figsoda/nix-develop.nvim does?

Add a command to call 'nix-shell' and then update the editor's
environment as if it was inside the new shell.

It's sometimes useful to fire up a nix-shell just to download a package
for using it once. It's annoying however when it's a library or any
other dependency of ':make', which can't be called from inside the
shell.

Example:

    :NixShell -p hello
    :term hello

There's no rollback command but it could be written if it's ever needed.
Calling the commande several times will nest environments the same way
as opening a shell inside a shell.
Don't proceed on failure and print an error message.
@Julow
Copy link
Author

Julow commented Aug 2, 2023

It's similar with a different API. That other plugin doesn't work with Vim.

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

Successfully merging this pull request may close these issues.

2 participants