Skip to content

Lazy loading Packer itself #618

Answered by dcampos
dcampos asked this question in Q&A
Discussion options

You must be logged in to vote

I've come to the conclusion that it is intended behavior, because Packer has to be present in runtimepath in order to load other plugins. Also, I think lazy loading Packer isn't that big of an advantage, as it doesn't set up anything unless I call packer.startup().

Anyway, what I'm doing right now is setting up the commands myself and only calling packer.startup() when I run one of them. The relevant part of my Packer config is below.

local function init_packer()
  vim.cmd('packadd packer.nvim')
  require('packer').startup({
    function(use)
      use { 'wbthomason/packer.nvim', opt = true }
      -- ...
    end,
    config = {
      compile_path = vim.fn.stdpath('data') .. '/site/plugin…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dcampos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant