fix(profiler): startup opts

This commit is contained in:
Folke Lemaitre 2024-12-01 19:47:27 +01:00
parent 93b254d658
commit 85f51320b2
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -347,6 +347,7 @@ end
-- Start the profiler on startup, and stop it after the event has been triggered.
---@param opts snacks.profiler.Config
function M.startup(opts)
M.config = Snacks.config.get("profiler", defaults, opts)
local event, pattern = M.config.startup.event or "VimEnter", M.config.startup.pattern
if event == "VeryLazy" then
event, pattern = "User", event