1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 03:14:55 +02:00
dotfiles/nvim/lua/user/utils/misc.lua

21 lines
481 B
Lua

local M = {}
---@class HighlightYankConfig
---@field enable boolean
---@field timeout number
---@field higroup string
---@param opts HighlightYankConfig
M.highlight_yank = function(opts)
vim.api.nvim_create_autocmd("TextYankPost", {
group = vim.api.nvim_create_augroup("highlight_yank", {}),
desc = "Hightlight selection on yank",
pattern = "*",
callback = function()
vim.highlight.on_yank(opts)
end,
})
end
return M