Skip to main content
  1. Blog/

Using nushell in neovim

·187 words·1 min

I took me a little while completely getting nushell to work as the shell in neovim, but having nushell at my fingertips directly in my text editor was well worth the effort.

I am using astronvim and altered the astrocore.lua file like so:

    shell = "/home/lk/.cargo/bin/nu",
    shellcmdflag = "--login --stdin --no-newline -c",
    shellredir = "out+err> %s",
    shellpipe = "| complete | update stderr { ansi strip } | tee { get stderr | save --force --raw %s } | into record",
    shelltemp = false,
    shellxescape = "",
    shellxquote = "",
    shellquote = "",

Some more generel explanation and settings can be found here:

integrations/nvim/init.lua at main · nushell/integrations

PS. I added the --login flag to get acces to my custom commands. They are very useful for me in nvim since I use it mainly to generate journalistic content. Especially my custom commands concerning aichat and “tucs”.

To read more about tuc and generative ai, see this blog posting:

Working with tuc in nushell · Kiils

And more generally about tuc as a data structure, please see:

tuc as text based data structure for online research · Kiils