From c9245a9d51861c70ab3a9cb7a713131df44acbb6 Mon Sep 17 00:00:00 2001 From: QQ <1770362456@qq.com> Date: Mon, 3 Apr 2023 19:41:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4treesitter=E9=A2=84=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/Plugin/treesitter.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/Plugin/treesitter.lua b/lua/Plugin/treesitter.lua index 2e357b4..caed80d 100644 --- a/lua/Plugin/treesitter.lua +++ b/lua/Plugin/treesitter.lua @@ -1,7 +1,7 @@ local G = require("G") require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" (the four listed parsers should always be installed) - ensure_installed = { "javascript", "typescript", "html", "css", "vue", "c", "lua", "vim", "help"}, + ensure_installed = {}, indent = { enable = true }, -- Install parsers synchronously (only applied to `ensure_installed`) @@ -29,7 +29,7 @@ require'nvim-treesitter.configs'.setup { -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files disable = function(lang, buf) local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, G.api.nvim_buf_get_name(buf)) + local ok, stats = pcall(G.loop.fs_stat, G.api.nvim_buf_get_name(buf)) if ok and stats and stats.size > max_filesize then return true end