How does :Pckr install know where the config is
Closed this issue · 3 comments
benlieb commented
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
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
@lewis6991 I assume you mean that it has to be "somewhere" in the require tree that is initiated by init.lua
?
lewis6991 commented
Yes