return { { 'nvim-treesitter/nvim-treesitter', branch = 'master', dependencies = { { 'nvim-treesitter/nvim-treesitter-refactor', lazy = false }, { 'nvim-treesitter/nvim-treesitter-textobjects', lazy = false }, -- { 'nvim-treesitter/playground', cmd = { 'TSPlayground' } }, }, lazy = false, build = ':TSUpdate', config = function(_, opts) require('nvim-treesitter.configs').setup(opts) -- use bash parser for gentoo ebuilds vim.treesitter.language.register('bash', 'ebuild') end, opts = { ensure_installed = { 'bash', 'c', 'cmake', 'comment', 'cpp', 'css', 'dockerfile', 'go', 'gomod', 'gotmpl', 'gowork', 'html', 'javascript', 'json', 'jsonc', 'lua', 'make', 'markdown', 'markdown_inline', 'ninja', 'python', 'regex', 'rust', 'scss', 'sql', 'todotxt', 'toml', 'typescript', 'typst', 'vim', 'vimdoc', 'yaml', 'zig', }, highlight = { enable = true, additional_vim_regex_highlighting = { 'markdown' }, }, indent = { enable = true, }, refactor = { navigation = { enable = true, }, smart_rename = { enable = true, }, }, textobjects = { select = { enable = true, keymaps = { ['ib'] = '@block.inner', ['ab'] = '@block.outer', -- ['ic'] = '@conditional.inner', -- ['ac'] = '@conditional.outer', ['if'] = '@function.inner', ['af'] = '@function.outer', ['il'] = '@loop.inner', ['al'] = '@loop.outer', ['is'] = '@scopename.inner', ['as'] = '@scopename.outer', ['ic'] = '@comment.inner', ['ac'] = '@comment.outer', }, selection_mode = { ['@comment.outer'] = 'V', }, }, }, }, }, }