Follow lazy_load guidelines

This commit is contained in:
nullchilly 2022-08-07 14:28:16 +07:00 committed by Sidhanth Rathod
parent a1565ce15c
commit 724bc1cdf3
2 changed files with 15 additions and 13 deletions

View File

@ -45,6 +45,20 @@ M.on_file_open = function(plugin_name)
} }
end end
M.packer_cmds = {
"PackerSnapshot",
"PackerSnapshotRollback",
"PackerSnapshotDelete",
"PackerInstall",
"PackerUpdate",
"PackerSync",
"PackerClean",
"PackerCompile",
"PackerStatus",
"PackerProfile",
"PackerLoad",
}
M.treesitter_cmds = { M.treesitter_cmds = {
"TSInstall", "TSInstall",
"TSBufEnable", "TSBufEnable",

View File

@ -4,19 +4,7 @@ local plugins = {
["nvim-lua/plenary.nvim"] = { module = "plenary" }, ["nvim-lua/plenary.nvim"] = { module = "plenary" },
["wbthomason/packer.nvim"] = { ["wbthomason/packer.nvim"] = {
cmd = { cmd = require("core.lazy_load").packer_cmds,
"PackerSnapshot",
"PackerSnapshotRollback",
"PackerSnapshotDelete",
"PackerInstall",
"PackerUpdate",
"PackerSync",
"PackerClean",
"PackerCompile",
"PackerStatus",
"PackerProfile",
"PackerLoad",
},
config = function() config = function()
require "plugins" require "plugins"
end, end,