|
|
|
@ -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 })
|
|
|
|
|