lua << EOF require'nvim-treesitter.configs'.setup { ensure_installed = "maintained", highlight = { enable = true, disable = {"typescript", "typescriptreact", "python", "vim"}, }, incremental_selection = { enable = true, keymaps = { init_selection = "gnn", node_incremental = "grn", scope_incremental = "grc", node_decremental = "grm", }, }, indent = { enable = false }, textobjects = { swap = { enable = true, swap_next = { ["a"] = "@parameter.inner", }, swap_previous = { ["A"] = "@parameter.inner", }, }, select = { enable = true, keymaps = { -- You can use the capture groups defined in textobjects.scm ["af"] = "@function.outer", ["if"] = "@function.inner", ["ac"] = "@class.outer", ["ic"] = "@class.inner", -- Or you can define your own textobjects like this ["iF"] = { python = "(function_definition) @function", cpp = "(function_definition) @function", c = "(function_definition) @function", java = "(method_declaration) @function", }, }, }, move = { enable = true, goto_next_start = { ["]]"] = "@function.outer", }, goto_next_end = { ["]["] = "@function.outer", }, goto_previous_start = { ["[["] = "@function.outer", }, goto_previous_end = { ["[M"] = "@function.outer", ["[]"] = "@function.outer", }, }, }, playground = { enable = true, disable = {}, updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code persist_queries = false, -- Whether the query persists across vim sessions keybindings = { toggle_query_editor = 'o', toggle_hl_groups = 'i', toggle_injected_languages = 't', toggle_anonymous_nodes = 'a', toggle_language_display = 'I', focus_language = 'f', unfocus_language = 'F', update = 'R', goto_node = '', show_help = '?', }, } } EOF