Files
nvim/lua/autocmd.lua

16 lines
494 B
Lua
Raw Permalink Normal View History

2025-04-12 23:49:02 +01:00
-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
require('helpers').edit_cf('a', '/lua/autocmd.lua')