From 4f5697226c1233b75b5b6d11363f8407aa53ae8d Mon Sep 17 00:00:00 2001 From: Patrick Flakus <63281512+pflakus@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:13:54 +0100 Subject: [PATCH] Make search highlight keybind be a toggle The keybind now inverts the current `hlsearch`-option, so it's also useful to (re-)enable the option as needed. --- lua/user/whichkey.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/user/whichkey.lua b/lua/user/whichkey.lua index 11b6a7e..651bdda 100644 --- a/lua/user/whichkey.lua +++ b/lua/user/whichkey.lua @@ -88,7 +88,7 @@ local mappings = { ["w"] = { "w!", "Save" }, ["q"] = { "q!", "Quit" }, ["c"] = { "Bdelete!", "Close Buffer" }, - ["h"] = { "nohlsearch", "No Highlight" }, + ["h"] = { "set invhlsearch", "Toggle Highlight" }, ["f"] = { "lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})", "Find files",