From a87e899f8a9279582cdc87729b9c658c7ff9b745 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 12 Dec 2023 01:19:06 +0100 Subject: [PATCH] nvim: improved search behaviour --- .config/nvim/lua/keymap.lua | 10 ++++++++++ .config/nvim/lua/plugins/nvim-hlslens.lua | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 .config/nvim/lua/plugins/nvim-hlslens.lua diff --git a/.config/nvim/lua/keymap.lua b/.config/nvim/lua/keymap.lua index dcc38f3..693399f 100644 --- a/.config/nvim/lua/keymap.lua +++ b/.config/nvim/lua/keymap.lua @@ -100,3 +100,13 @@ vim.keymap.set('n', 'K', function() vim.lsp.buf.hover() end end) + +-- kevinhwang91/nvim-hlslens +local kopts = {noremap = true, silent = true} + +vim.api.nvim_set_keymap('n', 'n', + [[execute('normal! ' . v:count1 . 'n')lua require('hlslens').start()]], + kopts) +vim.api.nvim_set_keymap('n', 'N', + [[execute('normal! ' . v:count1 . 'N')lua require('hlslens').start()]], + kopts) diff --git a/.config/nvim/lua/plugins/nvim-hlslens.lua b/.config/nvim/lua/plugins/nvim-hlslens.lua new file mode 100644 index 0000000..c3c897a --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-hlslens.lua @@ -0,0 +1,8 @@ +return { + { + 'kevinhwang91/nvim-hlslens', + opts = { + calm_down = true, + } + } +}