2022-01-26 20:42:58 +01:00
|
|
|
local cmd = vim.cmd
|
2021-11-10 13:09:54 +01:00
|
|
|
|
2022-05-03 19:28:52 +02:00
|
|
|
local config_group = vim.api.nvim_create_augroup('Config', {})
|
|
|
|
vim.api.nvim_create_autocmd({ 'TextYankPost' }, {
|
|
|
|
group = config_group,
|
|
|
|
callback = function()
|
|
|
|
vim.highlight.on_yank()
|
|
|
|
end,
|
|
|
|
})
|
2022-01-26 20:42:58 +01:00
|
|
|
|
2022-03-14 19:21:46 +01:00
|
|
|
cmd [[
|
|
|
|
augroup filetypedetect
|
|
|
|
au BufNewFile,BufRead *.frag setl ft=glsl
|
|
|
|
au BufNewFile,BufRead *.vert setl ft=glsl
|
|
|
|
augroup END
|
|
|
|
]]
|
|
|
|
|
2022-03-01 23:25:44 +01:00
|
|
|
cmd [[
|
|
|
|
augroup SaveManualFolds
|
|
|
|
autocmd!
|
|
|
|
au BufWinLeave, BufLeave ?* silent! mkview
|
|
|
|
au BufWinEnter ?* silent! loadview
|
|
|
|
augroup END
|
|
|
|
]]
|
2022-04-09 19:38:57 +02:00
|
|
|
|
2022-04-25 16:23:14 +02:00
|
|
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
2022-04-09 19:38:57 +02:00
|
|
|
callback = function()
|
2022-05-12 19:42:09 +02:00
|
|
|
vim.lsp.buf.format();
|
2022-04-09 19:38:57 +02:00
|
|
|
end
|
|
|
|
})
|