aboutsummaryrefslogtreecommitdiff
path: root/store/home/config/nvim/lua/setup/win.lua
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-03-12 22:50:12 +0800
committerYuqian Yang <crupest@crupest.life>2025-03-12 22:50:12 +0800
commit3d9b0c38adf1b2afd89ef33bbe70cd4eb4c1d8e6 (patch)
tree7d33fca9ba5af14e14cf0982eb7e6d0556ca12b0 /store/home/config/nvim/lua/setup/win.lua
parent9e635213f5a5145db7b31972050ab75f1aa19c15 (diff)
downloadcrupest-3d9b0c38adf1b2afd89ef33bbe70cd4eb4c1d8e6.tar.gz
crupest-3d9b0c38adf1b2afd89ef33bbe70cd4eb4c1d8e6.tar.bz2
crupest-3d9b0c38adf1b2afd89ef33bbe70cd4eb4c1d8e6.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.lua16
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
+}