From 0d29116b18a0b8321d4c4023e0c96ce014f56b65 Mon Sep 17 00:00:00 2001 From: ray-x Date: Fri, 2 Jul 2021 20:49:49 +1000 Subject: [PATCH] limit the number of file running treesitter analysis --- lua/navigator/lspwrapper.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/navigator/lspwrapper.lua b/lua/navigator/lspwrapper.lua index 1717777..3f87cad 100644 --- a/lua/navigator/lspwrapper.lua +++ b/lua/navigator/lspwrapper.lua @@ -271,7 +271,8 @@ function M.locations_to_items(locations) log(item.uri) -- file:///C:/path/to/file log(cwd) end - local proj_file = item.uri:find(cwd) or is_win + -- only load top 30 file. + local proj_file = item.uri:find(cwd) or is_win or i < 30 if TS_analysis_enabled and proj_file then funcs = ts_functions(item.uri)