vim-nix icon indicating copy to clipboard operation
vim-nix copied to clipboard

Add command :NixShell

Open Julow opened this issue 3 years ago • 2 comments

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.

Julow avatar Nov 12 '22 14:11 Julow

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

Ma27 avatar Jul 29 '23 12:07 Ma27

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

Julow avatar Aug 02 '23 17:08 Julow