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
|
@ -16,6 +16,7 @@ M.colors = {
|
|||
},
|
||||
ProgressTodo = "LineNr",
|
||||
Special = "@punctuation.special",
|
||||
HandlerRuntime = "@macro",
|
||||
HandlerPlugin = "Special",
|
||||
HandlerEvent = "Constant",
|
||||
HandlerKeys = "Statement",
|
||||
|
|
|
@ -210,6 +210,11 @@ function M:reason(reason, opts)
|
|||
end
|
||||
end
|
||||
end
|
||||
if reason.runtime then
|
||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/plugin/.*)", "%1")
|
||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/after/.*)", "%1")
|
||||
reason.runtime = reason.runtime:gsub(".*/([^/]+/ftdetect/.*)", "%1")
|
||||
end
|
||||
local time = reason.time and (" " .. math.floor(reason.time / 1e6 * 100) / 100 .. "ms")
|
||||
if time and not opts.time_right then
|
||||
self:append(time, "Bold")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue