mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 04:46:45 +00:00
feat(ui): improvements to profiling and rendering of loaded reasons
This commit is contained in:
parent
5eb2622a4e
commit
714bc0a136
5 changed files with 21 additions and 12 deletions
|
@ -217,7 +217,16 @@ function M:reason(reason, opts)
|
|||
self:append(" ")
|
||||
-- self:append(" (", "Conceal")
|
||||
local first = true
|
||||
for key, value in pairs(reason) do
|
||||
local keys = vim.tbl_keys(reason)
|
||||
table.sort(keys)
|
||||
if vim.tbl_contains(keys, "plugin") then
|
||||
keys = vim.tbl_filter(function(key)
|
||||
return key ~= "plugin"
|
||||
end, keys)
|
||||
table.insert(keys, "plugin")
|
||||
end
|
||||
for _, key in ipairs(keys) do
|
||||
local value = reason[key]
|
||||
if type(key) == "number" then
|
||||
elseif key == "require" then
|
||||
-- self:append("require", "@function.builtin")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue