-- -- Copyright (c) 2026 Jan Fooken -- -- 30_autocmd.lua -- -- Automatic commands are a way to execute code triggered by events. Honestly -- it's too much to explain here. Read up in |autocmd|. -- -- Normally each plugin uses its own augroup. For this level of complexity, -- let's stick to a single group. local group = vim.api.nvim_create_augroup('MyConfig', {}) do -- Visually highlight text after yanking it. See |vim.hl|. vim.api.nvim_create_autocmd('TextYankPost', { callback = function() vim.hl.on_yank() end, desc = 'Highlight yanked text', group = group, pattern = '*', }) end