diff options
Diffstat (limited to 'lua/plugins/core/treesitter.lua')
-rw-r--r-- | lua/plugins/core/treesitter.lua | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/lua/plugins/core/treesitter.lua b/lua/plugins/core/treesitter.lua index c540e48..065190f 100644 --- a/lua/plugins/core/treesitter.lua +++ b/lua/plugins/core/treesitter.lua @@ -18,14 +18,16 @@ end return { { "nvim-treesitter/nvim-treesitter", - --enabled = false, + -- Disable for now, this has been a big source of pain and errors in the + -- past + 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" }, @@ -33,16 +35,6 @@ return { highlight = { enable = true, additional_vim_regex_highlighting = false, - - -- disable for big files - disable = function(_, buf) - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = - pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, }, query_linter = { enable = true, |