Przeglądaj źródła

WhichKey: Make <leader>n clear search instead of toggling highlight (#519)

OliverNChalk 4 lat temu
rodzic
commit
257b6051e7
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      lua/lv-which-key/init.lua

+ 1 - 1
lua/lv-which-key/init.lua

@@ -48,7 +48,7 @@ vim.api.nvim_set_keymap('n', '<Space>', '<NOP>', {noremap = true, silent = true}
 vim.g.mapleader = ' '
 
 -- no hl
-vim.api.nvim_set_keymap('n', '<Leader>h', ':set hlsearch!<CR>', {noremap = true, silent = true})
+vim.api.nvim_set_keymap('n', '<Leader>h', ':let @/=""<CR>', {noremap = true, silent = true})
 
 -- explorer
 vim.api.nvim_set_keymap('n', '<Leader>e', ':NvimTreeToggle<CR>', {noremap = true, silent = true})