This commit is contained in:
Nachuan Tang
2023-12-29 19:34:35 +08:00
parent 4c07c4c6a5
commit a311601aea
7 changed files with 31 additions and 34 deletions
@@ -62,4 +62,18 @@ if HasPlug('toggleterm.nvim') then
vim.api.nvim_set_keymap("x", "<leader>tl", string.format(":ToggleTermSendVisualSelection %d<CR>", ipythonId),
{ noremap = true, silent = true })
print(vim.o.shell)
if vim.o.shell == 'pwsh' or vim.o.shell == 'powershell' then
local powershell_options = {
shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;",
shellredir = "-RedirectStandardOutput %s -NoNewWindow -Wait",
shellpipe = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode",
shellquote = "",
shellxquote = "",
}
for option, value in pairs(powershell_options) do
vim.opt[option] = value
end
end
end