lewis6991 / pckr.nvim

Spiritual successor of https://github.com/wbthomason/packer.nvim
MIT License
243 stars 13 forks source link

How does :Pckr install know where the config is #13

Closed benlieb closed 7 months ago

benlieb commented 7 months ago

The documentation isn't clear to me. Where does this information come from? Does it look for a specific file in a specific location?

lewis6991 commented 7 months ago

You as a user need to run require('pckr').add(...) in your init.lua.

I use this code to bootstrap it:

  local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"
  vim.opt.rtp:prepend(pckr_path)

  if not vim.uv.fs_stat(pckr_path) then
    vim.fn.system({
      'git',
      'clone',
      '--filter=blob:none',
      'https://github.com/lewis6991/pckr.nvim',
      pckr_path
    })
  end

  require('pckr').add{...}
benlieb commented 7 months ago

@lewis6991 I assume you mean that it has to be "somewhere" in the require tree that is initiated by init.lua?

lewis6991 commented 7 months ago

Yes