feat: introduce Snacks profiler key mappings

This commit is contained in:
2024-12-11 14:59:24 -05:00
parent a139e28b8e
commit 7dc7ec32b9
+26
View File
@@ -262,6 +262,32 @@ return {
'gregorias/coop.nvim',
lazy = false,
},
{
'folke/snacks.nvim',
opts = function()
-- Toggle the profiler
Snacks.toggle.profiler():map('<leader>qp')
-- Toggle the profiler highlights
Snacks.toggle.profiler_highlights():map('<leader>qh')
end,
keys = {
{
'<leader>qb',
function()
Snacks.profiler.scratch()
end,
desc = 'Profiler Scratch Bufer',
},
},
},
-- optional lualine component to show captured events
-- when the profiler is running
{
'nvim-lualine/lualine.nvim',
opts = function(_, opts)
table.insert(opts.sections.lualine_x, Snacks.profiler.status())
end,
},
{
'marcussimonsen/let-it-snow.nvim',
cmd = 'LetItSnow', -- Wait with loading until command is run