updates
This commit is contained in:
parent
ff3be5a3db
commit
eb6300a3d0
5 changed files with 15 additions and 137 deletions
|
@ -1,30 +0,0 @@
|
|||
return {
|
||||
"stevearc/profile.nvim",
|
||||
config = function()
|
||||
local should_profile = os.getenv("NVIM_PROFILE")
|
||||
if should_profile then
|
||||
require("profile").instrument_autocmds()
|
||||
if should_profile:lower():match("^start") then
|
||||
require("profile").start("*")
|
||||
else
|
||||
require("profile").instrument("*")
|
||||
end
|
||||
end
|
||||
|
||||
local function toggle_profile()
|
||||
local prof = require("profile")
|
||||
if prof.is_recording() then
|
||||
prof.stop()
|
||||
vim.ui.input({ prompt = "Save profile to:", completion = "file", default = "profile.json" }, function(filename)
|
||||
if filename then
|
||||
prof.export(filename)
|
||||
vim.notify(string.format("Wrote %s", filename))
|
||||
end
|
||||
end)
|
||||
else
|
||||
prof.start("*")
|
||||
end
|
||||
end
|
||||
vim.keymap.set("", "<f1>", toggle_profile)
|
||||
end,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue