mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-11-14 21:13:49 +00:00
import shell options from kickstart-based config for windows-pwsh
This commit is contained in:
parent
17f2d224b0
commit
ca521b400c
@ -11,9 +11,15 @@ vim.g.base_dir = vim.fn.getcwd()
|
|||||||
-- Set display language
|
-- Set display language
|
||||||
vim.cmd("silent! language en_US")
|
vim.cmd("silent! language en_US")
|
||||||
|
|
||||||
-- Detect and use PowerShell on Windows
|
-- Sets the shell to use for system() and ! commands in windows and wsl
|
||||||
if vim.fn.has("win32") == 1 or vim.fn.has("wsl") == 1 then
|
if vim.fn.has("win32") == 1 or vim.fn.has("wsl") == 1 then
|
||||||
LazyVim.terminal.setup("pwsh")
|
vim.opt.shell = vim.fn.executable("pwsh.exe") == 1 and "pwsh.exe" or "powershell.exe"
|
||||||
|
vim.opt.shellcmdflag =
|
||||||
|
"-NoLogo -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;"
|
||||||
|
vim.opt.shellredir = "-RedirectStandardOutput %s -NoNewWindow -Wait"
|
||||||
|
vim.opt.shellpipe = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode"
|
||||||
|
vim.opt.shellxquote = ""
|
||||||
|
vim.opt.shellquote = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Indenting
|
-- Indenting
|
||||||
|
Loading…
Reference in New Issue
Block a user