.dotfiles/configs/nvim/lua/core/autocommands.lua

30 lines
727 B
Lua
Raw Normal View History

2022-11-19 18:38:42 +01:00
local config_group = vim.api.nvim_create_augroup("Config", {})
2021-11-10 13:09:54 +01:00
2022-11-19 18:38:42 +01:00
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
2022-05-03 19:28:52 +02:00
group = config_group,
callback = function()
vim.highlight.on_yank()
end,
})
2022-01-26 20:42:58 +01:00
2022-11-17 23:38:29 +01:00
-- local rememberFoldsGroup = vim.api.nvim_create_augroup('RememberFolds', { clear = true })
2022-06-20 19:57:01 +02:00
--
-- vim.api.nvim_create_autocmd({ 'BufWinLeave', 'BufLeave' }, {
-- pattern = "*",
-- group = rememberFoldsGroup,
-- command = 'mkview'
-- })
--
-- vim.api.nvim_create_autocmd('BufWinEnter', {
-- pattern = "*",
-- group = rememberFoldsGroup,
-- command = 'silent! loadview'
-- })
2022-11-19 18:38:42 +01:00
vim.cmd([[
2022-03-14 19:21:46 +01:00
augroup filetypedetect
au BufNewFile,BufRead *.frag setl ft=glsl
au BufNewFile,BufRead *.vert setl ft=glsl
augroup END
2022-11-19 18:38:42 +01:00
]])