diff --git a/init.lua b/init.lua index 59a8066..8240e36 100644 --- a/init.lua +++ b/init.lua @@ -122,6 +122,14 @@ vim.api.nvim_create_autocmd('TextYankPost', { end, }) +-- https://neovim.discourse.group/t/how-do-i-jump-to-relative-line-number-with-gj-gk/2203/2 +vim.keymap.set({ 'n', 'x' }, 'j', function() + return vim.v.count > 0 and 'j' or 'gj' +end, { noremap = true, expr = true }) +vim.keymap.set({ 'n', 'x' }, 'k', function() + return vim.v.count > 0 and 'k' or 'gk' +end, { noremap = true, expr = true }) + -- treat underscore and hyphen NOT as word separators -- vim.opt.iskeyword:remove '-' -- vim.opt.iskeyword:remove '_' diff --git a/lua/rayandrew/commands.lua b/lua/rayandrew/commands.lua index fc09717..ec3dfe7 100644 --- a/lua/rayandrew/commands.lua +++ b/lua/rayandrew/commands.lua @@ -143,3 +143,13 @@ end, { nargs = '*', desc = 'Run compile command', }) + +-- https://www.reddit.com/r/neovim/comments/vnodft/comment/ie87z9r/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button +local wr_group = vim.api.nvim_create_augroup('WinResize', { clear = true }) + +vim.api.nvim_create_autocmd('VimResized', { + group = wr_group, + pattern = '*', + command = 'wincmd =', + desc = 'Automatically resize windows when the host window size changes.', +}) diff --git a/lua/rayandrew/plugins/avante.lua b/lua/rayandrew/plugins/avante.lua index 1ce5c33..9894f5e 100644 --- a/lua/rayandrew/plugins/avante.lua +++ b/lua/rayandrew/plugins/avante.lua @@ -1,6 +1,7 @@ return { { 'yetone/avante.nvim', + enabled = false, event = 'VeryLazy', build = 'make', opts = {