diff --git a/lua/plugins/util.lua b/lua/plugins/util.lua index 353732b..68aed1d 100644 --- a/lua/plugins/util.lua +++ b/lua/plugins/util.lua @@ -262,6 +262,32 @@ return { 'gregorias/coop.nvim', lazy = false, }, + { + 'folke/snacks.nvim', + opts = function() + -- Toggle the profiler + Snacks.toggle.profiler():map('qp') + -- Toggle the profiler highlights + Snacks.toggle.profiler_highlights():map('qh') + end, + keys = { + { + '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