️ perf(lazy-load): delegate plugins to their cmd/keymaps

Increase performance: Allow plugins to only load with their commands and keymaps whenever possible
This commit is contained in:
2024-08-04 06:57:07 -04:00
parent 335fe93d8a
commit b622454835
9 changed files with 291 additions and 333 deletions
+1 -10
View File
@@ -183,15 +183,6 @@ function M.setup_autocommands()
local autogrp = vim.api.nvim_create_augroup
local autocmd = vim.api.nvim_create_autocmd
autogrp("IndentHighlight", { clear = true })
-- Autocommand to trigger setup on FileType
-- autocmd("FileType", {
-- pattern = "*",
-- group = "IndentHighlight",
-- callback = function()
-- M.setup_indent_highlight()
-- M.setup_dashboard_highlight()
-- end,
-- })
-- List of filetypes to exclude
local excluded_filetypes = {
@@ -209,7 +200,7 @@ function M.setup_autocommands()
}
-- Autocommand to trigger setup on FileType
vim.api.nvim_create_autocmd("FileType", {
autocmd("FileType", {
group = "IndentHighlight",
callback = function()
local filetype = vim.bo.filetype