Don't load packer at startup
This commit is contained in:
		
							parent
							
								
									74ad741e63
								
							
						
					
					
						commit
						22c3cc0c0d
					
				
					 3 changed files with 30 additions and 3 deletions
				
			
		
							
								
								
									
										1
									
								
								init.lua
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								init.lua
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -5,6 +5,5 @@ require("core.utils").load_mappings()
 | 
			
		|||
 | 
			
		||||
-- setup packer + plugins
 | 
			
		||||
require("core.packer").bootstrap()
 | 
			
		||||
require "plugins"
 | 
			
		||||
 | 
			
		||||
pcall(require, "custom")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@ local M = {}
 | 
			
		|||
 | 
			
		||||
M.bootstrap = function()
 | 
			
		||||
  local fn = vim.fn
 | 
			
		||||
  local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
 | 
			
		||||
  local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim"
 | 
			
		||||
 | 
			
		||||
  vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,24 @@ vim.cmd "packadd packer.nvim"
 | 
			
		|||
local plugins = {
 | 
			
		||||
 | 
			
		||||
  ["nvim-lua/plenary.nvim"] = { module = "plenary" },
 | 
			
		||||
  ["wbthomason/packer.nvim"] = {},
 | 
			
		||||
  ["wbthomason/packer.nvim"] = {
 | 
			
		||||
    cmd = {
 | 
			
		||||
      "PackerSnapshot",
 | 
			
		||||
      "PackerSnapshotRollback",
 | 
			
		||||
      "PackerSnapshotDelete",
 | 
			
		||||
      "PackerInstall",
 | 
			
		||||
      "PackerUpdate",
 | 
			
		||||
      "PackerSync",
 | 
			
		||||
      "PackerClean",
 | 
			
		||||
      "PackerCompile",
 | 
			
		||||
      "PackerStatus",
 | 
			
		||||
      "PackerProfile",
 | 
			
		||||
      "PackerLoad"
 | 
			
		||||
    },
 | 
			
		||||
    config = function()
 | 
			
		||||
      require "plugins"
 | 
			
		||||
    end
 | 
			
		||||
  },
 | 
			
		||||
  ["NvChad/extensions"] = { module = { "telescope", "nvchad" } },
 | 
			
		||||
 | 
			
		||||
  ["NvChad/base46"] = {
 | 
			
		||||
| 
						 | 
				
			
			@ -206,6 +223,17 @@ local plugins = {
 | 
			
		|||
      require("core.utils").load_mappings "whichkey"
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- Speed up deffered plugins
 | 
			
		||||
  ["lewis6991/impatient.nvim"] = {
 | 
			
		||||
    event = "VimEnter",
 | 
			
		||||
    config = function()
 | 
			
		||||
      vim.defer_fn(function()
 | 
			
		||||
        local present, impatient = pcall(require, "impatient")
 | 
			
		||||
        if present then impatient.enable_profile() end
 | 
			
		||||
      end, 0)
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
require("core.packer").run(plugins)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue