vim.api.nvim_create_autocmd('TextYankPost', { desc = 'Highlight when yanking text', group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }), callback = function() vim.highlight.on_yank() end, }) vim.api.nvim_create_autocmd('BufEnter', { desc = 'Disable newlines on commented lines from continuing the comment', group = vim.api.nvim_create_augroup('disable-comments-continuation', { clear = true }), callback = function() -- vim.opt_local.formatoptions:remove('r') -- no comments on enter vim.opt_local.formatoptions:remove('o') -- no comments on `o` or `O` end, })