diff --git a/lua/custom/plugins/ui.lua b/lua/custom/plugins/ui.lua index a17b2e5..e7e9634 100644 --- a/lua/custom/plugins/ui.lua +++ b/lua/custom/plugins/ui.lua @@ -273,6 +273,17 @@ return { 'neo-tree', }, }, + -- looks weird but is useful: put your cursor on a word and other occurences + -- of the word in your buffer will be highlighted. You can then use + -- '[[' and ']]' to go to the next or previous occurence. + -- + -- Try it: + -- + -- word #### word ########### + -- ############## word ###### + -- #### word #### word word # + -- + -- (It might not work with comments) keys = { { ']]', desc = 'Next Reference' }, { '[[', desc = 'Prev Reference' }, @@ -280,6 +291,7 @@ return { config = function(_, opts) require('illuminate').configure(opts) + -- only magic follows local function map(key, dir, buffer) vim.keymap.set('n', key, function() require('illuminate')['goto_' .. dir .. '_reference'](false)