diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 6ddb858..a37c6ce 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -25,13 +25,16 @@ vim.keymap.set('x', '<', '', '>gv') local function hlWord() - local current_word = vim.call('expand','') + local current_word = vim.call('expand', '') vim.fn.setreg('/', "\\<" .. current_word .. "\\>") vim.opt.hlsearch = true end + -- Highlight word under cursor -vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true }) -vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true }) +vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true, desc = 'Higlight word under cursor' }) +vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true, desc = 'Highlight visual' }) -- Close Buffer -vim.keymap.set('n', '', ':bd') +vim.keymap.set('n', '', ':bd', { desc = 'Close buffer' }) + +vim.keymap.set('n', 'x', 'za', { desc = 'Toggle fold' })