require('plugins.nvim-treesitter.folding') return { 'nvim-treesitter/nvim-treesitter', version = false , build = ':TSUpdate' , dependencies = { { 'nvim-treesitter/nvim-treesitter-textobjects', } }, config = function() local configs = require('nvim-treesitter.configs') configs.setup({ highlight = { enable = true, }, indent = { enable = true, }, ensure_installed = { 'bash' , 'c' , 'cpp' , 'css' , 'diff' , 'html' , 'javascript' , 'json' , 'markdown' , 'markdown_inline', 'php' , 'python' , 'regex' , 'rust' , 'xml' , 'vim' , }, autotag = { enable = true, }, incremental_selection = { enable = true, keymaps = { init_selection = 'pts', node_incremental = 'ptn', scope_incremental = 'pts', node_decremental = 'ptd', } }, text_objects = { move = { enable = true, set_jumps = true, goto_next_start = { ['mnf'] = '@function.outer', ['mnc'] = '@class.outer' , ['mns'] = { query = '@scope' , query_group = 'locals' , desc = 'Scope suivant', } , } , goto_next_end = { ['mnF'] = '@function.outer', ['mnC'] = '@class.outer' , } , goto_previous_start = { ['mpf'] = '@function.outer', ['mpc'] = '@class.outer' , ['mns'] = { query = '@scope' , query_group = 'locals' , desc = 'Scope précédent', } , } , goto_previous_end = { ['mpF'] = '@function.outer', ['mpC'] = '@function.class', } , }, }, sync_install = false, auto_install = true , }) end }