From dc6dffa481368ec113899766434ec8217fa6d331 Mon Sep 17 00:00:00 2001 From: quirinecker Date: Thu, 5 Feb 2026 17:37:01 +0100 Subject: [PATCH] treesitter#2036 changed the way to configure treesitter. adjusted config for this --- .../neovim/lua/plugins/spec/treesitter.lua | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/homemanager/neovim/lua/plugins/spec/treesitter.lua b/homemanager/neovim/lua/plugins/spec/treesitter.lua index ffd6670..857bcc2 100644 --- a/homemanager/neovim/lua/plugins/spec/treesitter.lua +++ b/homemanager/neovim/lua/plugins/spec/treesitter.lua @@ -4,7 +4,7 @@ return { build = ':TSUpdate', event = { "BufReadPost", "BufNewFile" }, config = function() - require("nvim-treesitter.configs").setup { + require("nvim-treesitter").setup { ensure_installed = { "lua", "typescript", @@ -26,35 +26,31 @@ return { }, indent = { enable = true + }, + textobjects = { + select = { + enable = true, + lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["afn"] = "@function.outer", + ["ifn"] = "@function.inner", + ["acl"] = "@class.outer", + ["icl"] = "@class.inner", + ["icm"] = "@comment.inner", + ["acm"] = "@comment.outer", + ["ib"] = "@block.inner", + ["ab"] = "@block.outer", + ["la"] = "@assignment.lhs", + ["ra"] = "@assignment.lhs" + }, + } } } end, dependencies = { { "nvim-treesitter/nvim-treesitter-textobjects", - config = function() - require("nvim-treesitter.configs").setup { - textobjects = { - select = { - enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["afn"] = "@function.outer", - ["ifn"] = "@function.inner", - ["acl"] = "@class.outer", - ["icl"] = "@class.inner", - ["icm"] = "@comment.inner", - ["acm"] = "@comment.outer", - ["ib"] = "@block.inner", - ["ab"] = "@block.outer", - ["la"] = "@assignment.lhs", - ["ra"] = "@assignment.lhs" - }, - } - } - } - end }, } },