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 | 473e71165e47f029d1a578856ab936dd6f4bf9ed (patch) | |
tree | 65907f14ca2421a4fa4e00aaacf98cb892602920 /store/home/config/nvim/lua/setup/win.lua | |
parent | 198ce110ff67f645b5513ba2d445655f30f6416f (diff) | |
download | crupest-473e71165e47f029d1a578856ab936dd6f4bf9ed.tar.gz crupest-473e71165e47f029d1a578856ab936dd6f4bf9ed.tar.bz2 crupest-473e71165e47f029d1a578856ab936dd6f4bf9ed.zip |
feat(nvim): improve configs a lot.
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 +} |