Update: treesitter master branch

This commit is contained in:
hyzen
2026-04-03 16:34:33 +05:30
parent fbf6e5e724
commit 2b7bcbf4e0
3 changed files with 24 additions and 35 deletions

View File

@@ -1,19 +1,16 @@
return {
{
'nvim-treesitter/nvim-treesitter',
branch = 'master',
event = { 'BufReadPost', 'BufNewFile' },
build = ':TSUpdate',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
},
config = function()
-- See `:help nvim-treesitter`
-- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}'
vim.defer_fn(function()
require('nvim-treesitter.configs').setup {
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false,
highlight = { enable = true },
indent = { enable = true },
@@ -29,9 +26,8 @@ return {
textobjects = {
select = {
enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
['aa'] = '@parameter.outer',
['ia'] = '@parameter.inner',
['af'] = '@function.outer',
@@ -42,7 +38,7 @@ return {
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
set_jumps = true,
goto_next_start = {
[']m'] = '@function.outer',
[']]'] = '@class.outer',