Skip to content
Snippets Groups Projects
Unverified Commit 7a63b522 authored by amtoine's avatar amtoine
Browse files

simplify Nushell config file

parent c7c1b257
Branches
No related tags found
No related merge requests found
-- see https://github.com/nushell/integrations/blob/main/nvim/init.lua
-- for complementary information and comments for these options
vim.opt.shell = "nu"
vim.opt.shelltemp = false
vim.opt.shellredir = "out+err> %s"
vim.opt.shellcmdflag = "--stdin --no-newline -c"
-- stop quote everything e.g :!ls -> !'"ls"' -> is not a command
vim.opt.shellquote = ""
vim.opt.shellxescape = ""
vim.opt.shellxquote = ""
-- use pipes instead of temp files.
-- temp files sourced as follows:
--"(ls) < /8aYVe5/2 out+err> /8aYVe5/3"
-- which results in an error in nu.
-- And there is only way to change the second part with 'shellredir', but not the first.
-- neovim "remove shelltemp" discussion: https://github.com/neovim/neovim/issues/1008
vim.opt.shelltemp = false
-- if "shelltemp = false" this is not used
-- vim.opt.shellredir = "out+err> %s"
-- save to an nvim temp file for quickfix buffer and also print to the output window
-- command :make, for example with makeprg = 'lua %s':
-- :!lua test.lua | tee { save -f --raw /var/TRw4xR/5 }
vim.opt.shellpipe = "| tee { save -f --raw %s }"
vim.opt.shellquote = ""
vim.opt.shellpipe = ''..
'| complete'..
'| update stderr { ansi strip }'..
'| tee { get stderr | save --force --raw %s }'..
'| into record'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment