Nvim: add highlight on yank
This commit is contained in:
parent
4c9593bcb6
commit
72ab88d55d
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
require("keybinds")
|
||||
require("settings")
|
||||
require("highlight_yank")
|
||||
require("plugins.init")
|
||||
|
|
12
home/.config/nvim/lua/highlight_yank.lua
Normal file
12
home/.config/nvim/lua/highlight_yank.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
-- Highlight yanked text
|
||||
|
||||
local ag = vim.api.nvim_create_augroup
|
||||
local au = vim.api.nvim_create_autocmd
|
||||
|
||||
au('TextYankPost', {
|
||||
group = ag('yank_highlight', {}),
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
vim.highlight.on_yank { higroup='IncSearch', timeout=300 }
|
||||
end,
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue