From f3ecc060e6233573c54f00e3a06b8c1f1ba5ee1b Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Tue, 19 May 2026 12:28:07 +0100 Subject: [PATCH] Updated treesitter config for new neovim version --- lua/plugins/coding.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lua/plugins/coding.lua b/lua/plugins/coding.lua index 24d7f26..020e435 100644 --- a/lua/plugins/coding.lua +++ b/lua/plugins/coding.lua @@ -79,9 +79,18 @@ return { highlight = { enable = true }, indent = { enable = true }, }, - config = function(_, opts) - ---@diagnostic disable-next-line: missing-fields - require("nvim-treesitter.configs").setup(opts) + config = function() + local treesitter = require("nvim-treesitter") + treesitter.setup() + treesitter.install = { "bash", "c", "html", "lua", "markdown", "nu", "vim", "vimdoc" } + + vim.api.nvim_create_autocmd("FileType", { + pattern = { "bash", "c", "html", "lua", "markdown", "nu", "vim", "vimdoc" }, + callback = function() + vim.treesitter.start() + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end, + }) end, }, }