From 6da4ce3f41fdef42332b9bd0b202c2dfea39f2a8 Mon Sep 17 00:00:00 2001 From: Benjamin Kyd Date: Fri, 2 Aug 2024 10:53:28 +0100 Subject: [PATCH] Update plugins.lua --- common/.config/nvim/lua/plugins.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/common/.config/nvim/lua/plugins.lua b/common/.config/nvim/lua/plugins.lua index a1149c4..9f85fbb 100644 --- a/common/.config/nvim/lua/plugins.lua +++ b/common/.config/nvim/lua/plugins.lua @@ -14,7 +14,21 @@ return { { 'tzachar/local-highlight.nvim', config = function() - require('local-highlight').setup() + require('local-highlight').setup( + hlgroup = 'Search', + cw_hlgroup = nil, + -- Whether to display highlights in INSERT mode or not + insert_mode = true, + min_match_len = 1, + max_match_len = math.huge, + highlight_single_match = true, + }) + vim.api.nvim_create_autocmd('BufRead', { + pattern = {'*.*'}, + callback = function(data) + require('local-highlight').attach(data.buf) + end + }) end }, {