fix nvim clear search mapping

This commit is contained in:
thek4n 2026-03-13 19:03:10 +03:00
parent 96b8add23e
commit 797fdb5b41

View File

@ -25,10 +25,12 @@ end
map('n', '<Leader>hc', create_function_tabdo('set cursorline!'),
{desc = "Toggle line highlighting"})
map('n', '<Leader>h/',
function() vim.fn.setreg('/', '') end,
map('n', '<Leader>cs',
function() vim.fn.setreg('/', '\\%x') end,
{desc = "Clear search"})
map('n', '<Leader>h/', function() vim.o.hlsearch = not vim.o.hlsearch end, {desc = "Clear search"})
-- enable search highlight in search mode
map('n', '/', ':set hlsearch<CR>/', {silent = true})