add toggleterm plugin
This commit is contained in:
parent
9375eae25c
commit
dcf6329c0a
2 changed files with 42 additions and 0 deletions
18
init.lua
18
init.lua
|
|
@ -41,6 +41,20 @@ P.S. You can delete this when you're done too. It's your config now :)
|
|||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set powershell as the terminal
|
||||
local powershell_options = {
|
||||
shell = vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell",
|
||||
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
|
||||
|
||||
-- Install package manager
|
||||
-- https://github.com/folke/lazy.nvim
|
||||
-- `:help lazy.nvim.txt` for more info
|
||||
|
|
@ -267,6 +281,10 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
|||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
-- Set terminal keymaps
|
||||
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]])
|
||||
vim.keymap.set('t', 'jk', [[<C-\><C-n>]])
|
||||
|
||||
-- [[ Highlight on yank ]]
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue