feat(loader): allow to add extra paths to rtp reset. Fixes #64

This commit is contained in:
Folke Lemaitre 2022-12-21 15:19:14 +01:00
parent a345649510
commit 876f7bd471
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 7 additions and 0 deletions

View File

@ -309,6 +309,8 @@ return {
reset_packpath = true, -- reset the package path to improve startup time reset_packpath = true, -- reset the package path to improve startup time
rtp = { rtp = {
reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory
---@type string[]
paths = {}, -- add any custom paths here that you want to indluce in the rtp
---@type string[] list any plugins you want to disable here ---@type string[] list any plugins you want to disable here
disabled_plugins = { disabled_plugins = {
-- "gzip", -- "gzip",

View File

@ -69,6 +69,8 @@ M.defaults = {
reset_packpath = true, -- reset the package path to improve startup time reset_packpath = true, -- reset the package path to improve startup time
rtp = { rtp = {
reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory
---@type string[]
paths = {}, -- add any custom paths here that you want to indluce in the rtp
---@type string[] list any plugins you want to disable here ---@type string[] list any plugins you want to disable here
disabled_plugins = { disabled_plugins = {
-- "gzip", -- "gzip",
@ -142,6 +144,9 @@ function M.setup(spec, opts)
vim.fn.stdpath("config") .. "/after", vim.fn.stdpath("config") .. "/after",
} }
end end
for _, path in ipairs(M.options.performance.rtp.paths) do
vim.opt.rtp:append(path)
end
vim.opt.rtp:append(M.options.readme.root) vim.opt.rtp:append(M.options.readme.root)
-- disable plugin loading since we do all of that ourselves -- disable plugin loading since we do all of that ourselves