add autocmd to highlight yanked text

This commit is contained in:
krolyxon 2023-01-27 12:55:36 +05:30
parent 453a2349b5
commit c26944167e
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,6 @@
require ("core.options")
require("core.options")
require("core.utils").load_mappings()
require("core.autocmds")
-- require("ui").setup_colorscheme()
-- add binaries installed by mason.nvim to path
@ -9,7 +10,7 @@ vim.env.PATH = vim.env.PATH .. ":" .. vim.fn.stdpath "data" .. "/mason/bin"
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
require("core.bootstrap").lazy(lazypath)
require("core.bootstrap").lazy(lazypath)
end
vim.opt.rtp:prepend(lazypath)

6
lua/core/autocmds.lua Normal file
View File

@ -0,0 +1,6 @@
-- Highlight on yank
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
})