add autocmd for non-ignored fts

used to lazy-load on actual normal buffer opening
This commit is contained in:
2025-02-08 20:06:53 -05:00
parent 36febe9fe3
commit 23959a9b77
+14
View File
@@ -131,3 +131,17 @@ autocmd('CmdlineLeave', {
end
end,
})
autogrp('RootyCustomEvent', { clear = true })
autocmd({ 'BufReadPost', 'BufNewFile' }, {
group = 'RootyCustomEvent',
callback = function(args)
local ignored_filetypes = require('data.types').general.ft
local ft = vim.bo[args.buf].filetype
if not vim.tbl_contains(ignored_filetypes, ft) then
vim.api.nvim_exec_autocmds('User', { pattern = 'LazyFileOpen' })
end
end,
})