Skip to content

Outside of config directory, lazy load fails to find config file. #1021

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

You must be logged in to vote

I am trying to have a plugin load on the VimEnter event and as such am using a function to source the relevant config file only after the plugin has been loaded, as per the following in my packer.startup.

  -- Treesitter
  use {
    'nvim-treesitter/nvim-treesitter',
    opt = true, -- optional
    event = 'VimEnter',
    config = function()
      require 'treesitter'
    end
  }
  use {
    'p00f/nvim-ts-rainbow',
    after = 'nvim-treesitter', 
  }
  use {
    'nvim-treesitter/playground', -- useful for deving treesitter
    after = 'nvim-treesitter', 
  }

This works fine when I open any given file within my configuration dir (i.e. the same dir my packer config is in). But opening any…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Guiltybyte
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