add terminal config for linux and windows
This commit is contained in:
		
							parent
							
								
									11d0840dba
								
							
						
					
					
						commit
						528706506e
					
				
							
								
								
									
										6
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										6
									
								
								init.lua
								
								
								
								
							| 
						 | 
					@ -42,7 +42,9 @@ vim.g.mapleader = ' '
 | 
				
			||||||
vim.g.maplocalleader = ' '
 | 
					vim.g.maplocalleader = ' '
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Set powershell as the terminal
 | 
					-- Set powershell as the terminal
 | 
				
			||||||
local powershell_options = {
 | 
					local powershell_options = {}
 | 
				
			||||||
 | 
					if not vim.loop.os_uname() == "linux" then
 | 
				
			||||||
 | 
					  powershell_options = {
 | 
				
			||||||
    shell = vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell",
 | 
					    shell = vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell",
 | 
				
			||||||
    shellcmdflag =
 | 
					    shellcmdflag =
 | 
				
			||||||
    "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;",
 | 
					    "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;",
 | 
				
			||||||
| 
						 | 
					@ -55,6 +57,8 @@ local powershell_options = {
 | 
				
			||||||
  for option, value in pairs(powershell_options) do
 | 
					  for option, value in pairs(powershell_options) do
 | 
				
			||||||
    vim.opt[option] = value
 | 
					    vim.opt[option] = value
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Install package manager
 | 
					-- Install package manager
 | 
				
			||||||
--    https://github.com/folke/lazy.nvim
 | 
					--    https://github.com/folke/lazy.nvim
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue