aboutsummaryrefslogtreecommitdiff
path: root/Common/nvim/lua/helper_functions.lua
diff options
context:
space:
mode:
authorjakobst1n <jakob.stendahl@outlook.com>2024-09-19 10:01:54 +0200
committerjakobst1n <jakob.stendahl@outlook.com>2024-09-19 10:01:54 +0200
commite51ac2890e5196bdb7956a2665437b659eed8812 (patch)
tree1ca22ace55d542d63eadead720a4fbf8ecfe09b9 /Common/nvim/lua/helper_functions.lua
parentba3a4ea25b451c10cd372b81c9168ce038f69d1c (diff)
downloaddotfiles-testbranch.tar.gz
dotfiles-testbranch.zip
Do a bunch of random thingstestbranch
Diffstat (limited to 'Common/nvim/lua/helper_functions.lua')
-rwxr-xr-xCommon/nvim/lua/helper_functions.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/Common/nvim/lua/helper_functions.lua b/Common/nvim/lua/helper_functions.lua
index 9d5a80e..15db30a 100755
--- a/Common/nvim/lua/helper_functions.lua
+++ b/Common/nvim/lua/helper_functions.lua
@@ -251,3 +251,13 @@ vim.api.nvim_create_user_command("InsertDateTime", insert_date_time, {})
-- Reminders for system clipboard register
vim.api.nvim_set_keymap('v', '<leader>y', [[:lua vim.api.nvim_echo({{"Use register '+' for system clipboard", "ErrorMsg"}}, false, {})<CR>]], {noremap = true, silent=false})
vim.api.nvim_set_keymap('n', '<leader>y', [[:lua vim.api.nvim_echo({{"Use register '+' for system clipboard", "ErrorMsg"}}, false, {})<CR>]], {noremap = true, silent=false})
+
+
+vim.cmd [[
+augroup highlight_current_word
+ autocmd!
+ autocmd CursorHold * lua vim.lsp.buf.document_highlight()
+ autocmd CursorHoldI * lua vim.lsp.buf.document_highlight()
+ autocmd CursorMoved * lua vim.lsp.buf.clear_references()
+augroup END
+]]