10 lines
314 B
Lua
10 lines
314 B
Lua
|
-- Highlight when yanking (copying) text
|
||
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||
|
desc = 'Highlight when yanking (copying) text',
|
||
|
group = vim.api.nvim_create_augroup('user-highlight-yank', { clear = true }),
|
||
|
callback = function()
|
||
|
vim.highlight.on_yank()
|
||
|
end,
|
||
|
})
|
||
|
--- See `:help vim.highlight.on_yank()`
|