Files
nvim/lua/autocmd.lua
Thomas Ruoff 2c152c5ef3 wip
2024-06-26 21:52:49 +02:00

25 lines
551 B
Lua

vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
vim.api.nvim_create_autocmd('FileType', {
pattern = {
'checkhealth',
'fugitive*',
'git',
'help',
'lspinfo',
'netrw',
'notify',
'qf',
'query',
},
callback = function()
vim.keymap.set('n', 'q', vim.cmd.close, { desc = 'Close the current buffer', buffer = true })
end,
})