mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
perf: added profiling for sourcing of runtime files
This commit is contained in:
parent
08d081f21d
commit
be509c01f9
4 changed files with 15 additions and 6 deletions
|
@ -37,15 +37,16 @@ M.defaults = {
|
|||
-- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
|
||||
border = "none",
|
||||
icons = {
|
||||
start = "",
|
||||
init = " ",
|
||||
plugin = " ",
|
||||
source = " ",
|
||||
cmd = " ",
|
||||
config = "",
|
||||
event = "",
|
||||
keys = " ",
|
||||
cmd = " ",
|
||||
ft = " ",
|
||||
init = " ",
|
||||
keys = " ",
|
||||
plugin = " ",
|
||||
runtime = " ",
|
||||
source = " ",
|
||||
start = "",
|
||||
task = "✔ ",
|
||||
},
|
||||
throttle = 20, -- how frequently should the ui process render events
|
||||
|
|
|
@ -134,7 +134,9 @@ function M.source_runtime(...)
|
|||
Util.walk(dir, function(path, _, t)
|
||||
local ext = path:sub(-3)
|
||||
if t == "file" and (ext == "lua" or ext == "vim") then
|
||||
Util.track({ runtime = path })
|
||||
vim.cmd("silent source " .. path)
|
||||
Util.track()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue