From c42d60e358779b4ce8ccaae1b5bf395da2997f6b Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Thu, 18 Apr 2024 20:56:40 +0200 Subject: re-enable ts --- lua/plugins/core/treesitter.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'lua/plugins') diff --git a/lua/plugins/core/treesitter.lua b/lua/plugins/core/treesitter.lua index 518f66b..c540e48 100644 --- a/lua/plugins/core/treesitter.lua +++ b/lua/plugins/core/treesitter.lua @@ -18,13 +18,14 @@ end return { { "nvim-treesitter/nvim-treesitter", + --enabled = false, build = ":TSUpdate", cmd = { "TSUpdateSync" }, event = { "BufReadPost", "BufNewFile" }, - init = function() - vim.o.foldmethod = "expr" - vim.o.foldexpr = "nvim_treesitter#foldexpr()" - end, + --init = function() + --vim.o.foldmethod = "expr" + --vim.o.foldexpr = "nvim_treesitter#foldexpr()" + --end, opts = { indent = { enable = true }, ensure_installed = { "query" }, @@ -32,6 +33,7 @@ return { highlight = { enable = true, additional_vim_regex_highlighting = false, + -- disable for big files disable = function(_, buf) local max_filesize = 100 * 1024 -- 100 KB @@ -52,6 +54,9 @@ return { if type(opts.ensure_installed) == "table" then opts.ensure_installed = tbl_uniq(opts.ensure_installed) end + if type(opts.ignore_install) == "table" then + opts.ignore_install = tbl_uniq(opts.ignore_install) + end require("nvim-treesitter.configs").setup(opts) end, }, -- cgit v1.2.3