diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 20611b9..59eb4dd 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -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 diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index 95a0c80..d32e894 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -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 diff --git a/lua/lazy/view/colors.lua b/lua/lazy/view/colors.lua index 6da5d74..01a6dfc 100644 --- a/lua/lazy/view/colors.lua +++ b/lua/lazy/view/colors.lua @@ -16,6 +16,7 @@ M.colors = { }, ProgressTodo = "LineNr", Special = "@punctuation.special", + HandlerRuntime = "@macro", HandlerPlugin = "Special", HandlerEvent = "Constant", HandlerKeys = "Statement", diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index d1fd99b..26597ef 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -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")