return { event = { 'BufReadPost', 'BufWritePost', 'BufNewFile', 'DeferredUIEnter' }, keys = { { '', desc = 'increment selection' }, { '', desc = 'decrement selection', mode = 'x' }, }, before = function() require('lz.n').trigger_load('which-key.nvim') end, after = function() ---@diagnostic disable-next-line: missing-fields require('nvim-treesitter.configs').setup({ auto_install = false, highlight = { enable = true }, indent = { enable = true }, incremental_selection = { enable = true, keymaps = { init_selection = '', node_incremental = '', scope_incremental = false, node_decremental = '', }, }, textobjects = { move = { enable = true, goto_next_start = { [']f'] = '@function.outer', [']c'] = '@class.outer', [']a'] = '@parameter.inner', }, goto_next_end = { [']F'] = '@function.outer', [']C'] = '@class.outer', [']A'] = '@parameter.inner', }, goto_previous_start = { ['[f'] = '@function.outer', ['[c'] = '@class.outer', ['[a'] = '@parameter.inner', }, goto_previous_end = { ['[F'] = '@function.outer', ['[C'] = '@class.outer', ['[A'] = '@parameter.inner', }, }, }, }) require('which-key').add({ { '', desc = 'decrement selection', mode = 'x' }, { '', desc = 'increment selection', mode = { 'x', 'n' } }, }) end, }