feat: introduce Snacks profiler key mappings
This commit is contained in:
@@ -262,6 +262,32 @@ return {
|
|||||||
'gregorias/coop.nvim',
|
'gregorias/coop.nvim',
|
||||||
lazy = false,
|
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',
|
'marcussimonsen/let-it-snow.nvim',
|
||||||
cmd = 'LetItSnow', -- Wait with loading until command is run
|
cmd = 'LetItSnow', -- Wait with loading until command is run
|
||||||
|
|||||||
Reference in New Issue
Block a user