mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 04:46:45 +00:00
fix: source plugin files for plugins that want to run a build script during startup
This commit is contained in:
parent
93d30722a0
commit
3ed24baeb0
2 changed files with 7 additions and 6 deletions
|
@ -10,9 +10,10 @@ M.build = {
|
|||
end,
|
||||
run = function(self)
|
||||
Loader.load(self.plugin, { task = "build" })
|
||||
-- when installing during startup, add the package
|
||||
-- to make sure all runtime files are loaded
|
||||
Loader.packadd(self.plugin, true)
|
||||
|
||||
-- we need to source its plugin files before startup,
|
||||
-- to make sure the build command has everything available
|
||||
Loader.source_runtime(self.plugin.dir, "plugin")
|
||||
|
||||
local build = self.plugin.build
|
||||
if build then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue