Skip to content

Commit

Permalink
limit the number of file running treesitter analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed Jul 2, 2021
1 parent b08bfd6 commit 0d29116
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/navigator/lspwrapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 0d29116

Please sign in to comment.