mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat(loader): added error handler to sourcing of runtime files
This commit is contained in:
parent
53affcaaf4
commit
eeb06a5a50
1 changed files with 3 additions and 1 deletions
|
@ -171,7 +171,9 @@ function M.source_runtime(...)
|
|||
name = name:sub(1, -5)
|
||||
if t == "file" and (ext == "lua" or ext == "vim") and not M.disabled_rtp_plugins[name] then
|
||||
Util.track({ runtime = path })
|
||||
vim.cmd("silent source " .. path)
|
||||
Util.try(function()
|
||||
vim.cmd("silent source " .. path)
|
||||
end, "Failed to source `" .. path .. "`")
|
||||
Util.track()
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue