clear search nvim

This commit is contained in:
thek4n 2026-03-10 14:53:56 +03:00
parent 8fbc4c98a9
commit 9589501580

View File

@ -26,8 +26,8 @@ map('n', '<Leader>hc', create_function_tabdo('set cursorline!'),
{desc = "Toggle line highlighting"})
map('n', '<Leader>h/',
function() vim.opt.hlsearch = not vim.opt.hlsearch["_value"] end,
{desc = "Toggle search highlighting"})
function() vim.fn.setreg('/', '') end,
{desc = "Clear search"})
-- enable search highlight in search mode
@ -182,4 +182,4 @@ map("n", "<Leader>cn", "<cmd>colorscheme nightfox<CR>")
map("n", "<Leader>ct", "<cmd>colorscheme elflord<CR>",
{desc = "TTY colorscheme"}
)
)