--- @type LazySpec | LazySpec[] return { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VeryLazy', -- Sets the loading event to 'VimEnter' opts = { -- delay between pressing a key and opening which-key (milliseconds) -- this setting is independent of vim.opt.timeoutlen delay = 300, preset = 'modern', expand = function(node) return not node.desc -- expand all nodes without a description end, -- Which-key automatically sets up triggers for your mappings. -- But you can disable this and setup the triggers manually. -- Check the docs for more info. ---@type wk.Spec triggers = { { '', mode = 'nixsotc' }, { 'a', mode = { 'n', 'v' } }, { 'i', mode = { 'n', 'v' } }, }, -- Document existing key chains spec = { { 'a', group = 'Avante' }, { 'c', group = 'Code', mode = { 'n', 'x' } }, { 'ct', group = 'Tests' }, { 'd', group = 'Document' }, { 'di', group = 'Insert' }, { 'e', group = 'Editor' }, { 'g', group = 'Git' }, { 's', group = 'Search' }, { 'S', group = 'Session' }, { 'M', hidden = true }, { 'N', hidden = true }, }, }, keys = { { '?', function() require('which-key').show { global = false } end, desc = 'Buffer Local Keymaps (which-key)', }, }, }