mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-29 03:44:14 +00:00
Merge remote-tracking branch 'upstream/main' into feat/prioritize-cond
This commit is contained in:
commit
7e39270651
27 changed files with 1212 additions and 905 deletions
|
@ -160,7 +160,7 @@ end
|
|||
function M:help()
|
||||
self:append("Help", "LazyH2"):nl():nl()
|
||||
|
||||
self:append("Use "):append("<C-c>", "LazySpecial"):append(" to abort all running tasks."):nl():nl()
|
||||
self:append("Use "):append(ViewConfig.keys.abort, "LazySpecial"):append(" to abort all running tasks."):nl():nl()
|
||||
|
||||
self:append("You can press "):append("<CR>", "LazySpecial"):append(" on a plugin to show its details."):nl():nl()
|
||||
|
||||
|
@ -670,33 +670,19 @@ function M:debug()
|
|||
end)
|
||||
self:nl()
|
||||
|
||||
self:append("Cache.find()", "LazyH2"):nl()
|
||||
self:props({
|
||||
{ "total", Cache.stats.find.total, "Number" },
|
||||
{ "time", self:ms(Cache.stats.find.time, 3), "Bold" },
|
||||
{ "avg time", self:ms(Cache.stats.find.time / Cache.stats.find.total, 3), "Bold" },
|
||||
{ "index", Cache.stats.find.index, "Number" },
|
||||
{ "fs_stat", Cache.stats.find.stat, "Number" },
|
||||
{ "not found", Cache.stats.find.not_found, "Number" },
|
||||
}, { indent = 2 })
|
||||
self:nl()
|
||||
|
||||
self:append("Cache.autoload()", "LazyH2"):nl()
|
||||
self:props({
|
||||
{ "total", Cache.stats.autoload.total, "Number" },
|
||||
{ "time", self:ms(Cache.stats.autoload.time, 3), "Bold" },
|
||||
{ "avg time", self:ms(Cache.stats.autoload.time / Cache.stats.autoload.total, 3), "Bold" },
|
||||
}, { indent = 2 })
|
||||
self:nl()
|
||||
|
||||
self:append("Cache", "LazyH2"):nl()
|
||||
local Cache = require("lazy.core.cache")
|
||||
Util.foreach(Cache.cache, function(modname, entry)
|
||||
local kb = math.floor(#entry.chunk / 10.24) / 100
|
||||
self:append("● ", "LazySpecial", { indent = 2 }):append(modname):append(" " .. kb .. "Kb", "Bold")
|
||||
if entry.modpath ~= modname then
|
||||
self:append(" " .. vim.fn.fnamemodify(entry.modpath, ":p:~:."), "LazyComment")
|
||||
Util.foreach(Cache.stats, function(name, stats)
|
||||
self:append(name, "LazyH2"):nl()
|
||||
local props = {
|
||||
{ "total", stats.total or 0, "Number" },
|
||||
{ "time", self:ms(stats.time or 0, 3), "Bold" },
|
||||
{ "avg time", self:ms((stats.time or 0) / (stats.total or 0), 3), "Bold" },
|
||||
}
|
||||
for k, v in pairs(stats) do
|
||||
if k ~= "total" and k ~= "time" then
|
||||
props[#props + 1] = { k, v, "Number" }
|
||||
end
|
||||
end
|
||||
self:props(props, { indent = 2 })
|
||||
self:nl()
|
||||
end)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue