From ffb7d668889d1babc0bc39d4575fda7f2485b842 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Sat, 15 Nov 2025 23:51:23 +0100 Subject: [PATCH] nvim: Fix treesitter config --- nvim/.config/nvim/lua/plugins/treesitter.lua | 46 +++++++++++--------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua index 1273e28..bb54c81 100644 --- a/nvim/.config/nvim/lua/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -1,23 +1,29 @@ return { - "nvim-treesitter/nvim-treesitter", - branch = 'main', - lazy = false, -- This plugin does not support lazy loading - build = ":TSUpdate", - opts = { - ensure_installed = { - "cpp", - "c", - "python", - "rust", - "lua", - "markdown", - "vimdoc", - }, - auto_install = true, - highlight = { - enable = true, - -- TODO: Is this required? - additional_vim_regex_highlighting = { "latex" } -- Required for vimtex - } + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + branxh = "main", + lazy = false, -- This plugin doesn't support lazy loading + config = function(_, opts) + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "cpp", + "c", + "lua", + "vim", + "vimdoc", + "query" + }, + sync_install = false, + auto_install = true, + highlight = { + -- disable = { "latex" }, + enable = true, + additional_vim_regex_highlighting = { + "latex" + } + } + }) + end } }