feat: Add yank highlight
This commit is contained in:
parent
3777f30d68
commit
e3fd51d189
1 changed files with 8 additions and 0 deletions
|
@ -25,6 +25,14 @@ opt.relativenumber = true
|
||||||
opt.cursorline = true
|
opt.cursorline = true
|
||||||
opt.lazyredraw = true
|
opt.lazyredraw = true
|
||||||
opt.showmatch = true -- Highlight matching parentheses, etc
|
opt.showmatch = true -- Highlight matching parentheses, etc
|
||||||
|
vim.api.nvim_create_autocmd('TextYankPost', { -- Highlight yank
|
||||||
|
group = vim.api.nvim_create_augroup('highlight_yank', {}),
|
||||||
|
desc = 'Hightlight selection on yank',
|
||||||
|
pattern = '*',
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank { higroup = 'IncSearch', timeout = 200 }
|
||||||
|
end,
|
||||||
|
})
|
||||||
opt.incsearch = true
|
opt.incsearch = true
|
||||||
opt.hlsearch = true
|
opt.hlsearch = true
|
||||||
opt.ignorecase = true -- Make search case insensitive
|
opt.ignorecase = true -- Make search case insensitive
|
||||||
|
|
Loading…
Reference in a new issue