mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat(profiling): added options to enable additional profiling
This commit is contained in:
parent
ce3e8523de
commit
423a152e94
6 changed files with 102 additions and 60 deletions
|
@ -65,6 +65,7 @@ M.defaults = {
|
|||
not_loaded = "○",
|
||||
plugin = " ",
|
||||
runtime = " ",
|
||||
require = " ",
|
||||
source = " ",
|
||||
start = "",
|
||||
task = "✔ ",
|
||||
|
@ -158,6 +159,15 @@ M.defaults = {
|
|||
-- executed. In this case, a warning message will be shown.
|
||||
warn_on_override = true,
|
||||
},
|
||||
-- Enable profiling of lazy.nvim. This will add some overhead,
|
||||
-- so only enable this when you are debugging lazy.nvim
|
||||
profiling = {
|
||||
-- Enables extra stats on the debug tab related to the loader cache.
|
||||
-- Additionally gathers stats about all package.loaders
|
||||
loader = false,
|
||||
-- Track each new require in the Lazy profiling tab
|
||||
require = false,
|
||||
},
|
||||
debug = false,
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ function M.get_source()
|
|||
if not info then
|
||||
break
|
||||
end
|
||||
if info.what ~= "C" and not info.source:find("lazy.nvim", 1, true) then
|
||||
if info.what ~= "C" and not info.source:find("lazy.nvim", 1, true) and info.source ~= "@vim/loader.lua" then
|
||||
return info.source:sub(2)
|
||||
end
|
||||
f = f + 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue