feat: Add yank highlight

This commit is contained in:
Jiří Štefka 2024-09-23 03:28:35 +02:00
parent 3777f30d68
commit e3fd51d189
Signed by: jiriks74
GPG Key ID: 1D5E30D3DB2264DE

@ -25,6 +25,14 @@ opt.relativenumber = true
opt.cursorline = true
opt.lazyredraw = true
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.hlsearch = true
opt.ignorecase = true -- Make search case insensitive