aboutsummaryrefslogtreecommitdiff
path: root/Common/nvim/lua/helper_functions.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Common/nvim/lua/helper_functions.lua')
-rwxr-xr-xCommon/nvim/lua/helper_functions.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/Common/nvim/lua/helper_functions.lua b/Common/nvim/lua/helper_functions.lua
index 6c12495..05150c0 100755
--- a/Common/nvim/lua/helper_functions.lua
+++ b/Common/nvim/lua/helper_functions.lua
@@ -173,3 +173,14 @@ end
vim.cmd [[
command! InvertNumberUnderCursor lua invertNumberUnderCursor()
]]
+
+-- helpful highlight when yanking text
+-- See `:help vim.highlight.on_yank()`
+vim.api.nvim_create_autocmd('TextYankPost', {
+ desc = 'Highlight when yanking (copying) text',
+ group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
+ callback = function()
+ vim.highlight.on_yank()
+ end,
+})
+