diff --git a/nvim/lua/plugins/motions.lua b/nvim/lua/plugins/motions.lua index 341457d..974c181 100644 --- a/nvim/lua/plugins/motions.lua +++ b/nvim/lua/plugins/motions.lua @@ -6,5 +6,32 @@ return { after = function() require("nvim-surround").setup({}) end, - } + }, + + { + "vim-wordmotion", + lazy = false, + load = function() end, + keys = { + -- This overrides the default ge & gw but i never used them. + { "gw", "WordMotion_w", desc = "Next small world", mode = { "n", "x", "o" } }, + { "ge", "WordMotion_e", desc = "Next end of small world", mode = { "n", "x", "o" } }, + { "gb", "WordMotion_b", desc = "Previous small world", mode = { "n", "x", "o" } }, + { "igw", "WordMotion_iw", desc = "inner small word", mode = { "x", "o" } }, + { "agw", "WordMotion_aw", desc = "a small word (with white-space)", mode = { "x", "o" } }, + }, + after = function() + vim.g.wordmotion_nomap = true + end, + }, + + { + "increment-activator", + lazy = false, + load = function() end, + keys = { + { "", desc = "Increment" }, + { "", desc = "Decrement" }, + }, + }, } diff --git a/nvim/lua/settings.lua b/nvim/lua/settings.lua index 9853eb0..fb039e5 100644 --- a/nvim/lua/settings.lua +++ b/nvim/lua/settings.lua @@ -88,7 +88,9 @@ vim.api.nvim_create_autocmd("TextYankPost", { desc = 'Highlight when yanking (copying) text', group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }), callback = function() - vim.highlight.on_yank() + vim.highlight.on_yank({ + higroup = 'Visual', + }) end, })