Do not load packer on startup
Actually saved some milliseconds, can be observed in benchmarks too from packer readme ``` To optimize startup time, packer.nvim compiles code to perform the lazy-loading operations you specify. This means that you do not need to load packer.nvim unless you want to perform some plugin management operations. ``` Add packer commands manually to mappings.lua, but with basic functionalty By this, we don't losr the packer commands and don't even load at startup After some command is actually executed, it will load the PackerCommands as they were
This commit is contained in:
parent
6b4435caef
commit
92eb5ca740
2 changed files with 7 additions and 1 deletions
1
init.lua
1
init.lua
|
@ -1,6 +1,5 @@
|
|||
local chad_modules = {
|
||||
"options",
|
||||
"pluginList",
|
||||
"mappings",
|
||||
"utils"
|
||||
}
|
||||
|
|
|
@ -146,3 +146,10 @@ map("n", "<Esc>", ":noh<CR>", opt)
|
|||
|
||||
-- get out of terminal with jk
|
||||
map("t", "jk", "<C-\\><C-n>", opt)
|
||||
|
||||
-- Packer commands till because we are not loading it at startup
|
||||
vim.cmd("silent! command PackerCompile lua require 'pluginList' require('packer').compile()")
|
||||
vim.cmd("silent! command PackerInstall lua require 'pluginList' require('packer').install()")
|
||||
vim.cmd("silent! command PackerStatus lua require 'pluginList' require('packer').status()")
|
||||
vim.cmd("silent! command PackerSync lua require 'pluginList' require('packer').sync()")
|
||||
vim.cmd("silent! command PackerUpdate lua require 'pluginList' require('packer').update()")
|
||||
|
|
Loading…
Reference in a new issue