add autocmd to highlight yanked text
This commit is contained in:
parent
453a2349b5
commit
c26944167e
5
init.lua
5
init.lua
|
|
@ -1,5 +1,6 @@
|
||||||
require ("core.options")
|
require("core.options")
|
||||||
require("core.utils").load_mappings()
|
require("core.utils").load_mappings()
|
||||||
|
require("core.autocmds")
|
||||||
-- require("ui").setup_colorscheme()
|
-- require("ui").setup_colorscheme()
|
||||||
|
|
||||||
-- add binaries installed by mason.nvim to path
|
-- 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"
|
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||||
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
require("core.bootstrap").lazy(lazypath)
|
require("core.bootstrap").lazy(lazypath)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
-- Highlight on yank
|
||||||
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
Reference in New Issue