diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-03-12 22:50:12 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-03-12 22:50:12 +0800 |
commit | 3ad034a1b5755bd5d8ebed71637dedb9089a7dce (patch) | |
tree | 228aed35af429f3819b897da2dd3b12742063f7d /store/home/config/nvim/lua/setup/win.lua | |
parent | 117afbc9af2cd4fd515d7fdbda8a1fa44c3d8a74 (diff) | |
download | crupest-main.tar.gz crupest-main.tar.bz2 crupest-main.zip |
Diffstat (limited to 'store/home/config/nvim/lua/setup/win.lua')
-rw-r--r-- | store/home/config/nvim/lua/setup/win.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/store/home/config/nvim/lua/setup/win.lua b/store/home/config/nvim/lua/setup/win.lua new file mode 100644 index 0000000..90e168a --- /dev/null +++ b/store/home/config/nvim/lua/setup/win.lua @@ -0,0 +1,16 @@ +-- spellchecker: words pwsh +-- spellchecker: ignore shellcmdflag shellredir shellpipe shellquote shellxquote +local function setup() + vim.cmd([[ + let &shell = executable('pwsh') ? 'pwsh' : 'powershell' + let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;' + let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode' + let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode' + set shellquote= shellxquote= + ]]) + vim.opt.completeslash = 'slash' +end + +return { + setup = setup +} |