From b93e5eeb7f9420eb0d569b606109b9cfef919405 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Tue, 14 May 2024 11:01:52 +0200 Subject: [PATCH] better powershell configuration --- lua/options.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/options.lua b/lua/options.lua index 4e469d4..11affb7 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -9,12 +9,13 @@ vim.api.nvim_exec2('language en_US', {}) -- Shell options -- Sets the shell to use for system() and ! commands in windows if vim.fn.has 'win32' then - vim.opt.shell = 'powershell.exe' - vim.opt.shellcmdflag = '-NonInteractive -NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command ' + vim.opt.shell = 'pwsh' + vim.opt.shellcmdflag = + '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;' + vim.opt.shellredir = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' + vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' vim.opt.shellxquote = '' vim.opt.shellquote = '' - vim.opt.shellredir = '2>&1 | Out-File -Encoding UTF8 %s' - vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s' end -- Format settings