summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/install.lua
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-08-11 14:36:13 +0200
committerThomas Vigouroux <39092278+vigoux@users.noreply.github.com>2020-08-11 20:21:22 +0200
commitba3167a1a4fdc9028eb1f088e823ac1dceb202f4 (patch)
tree9beeb06dde0aba0871d9c393a4ee7d0649d966b9 /lua/nvim-treesitter/install.lua
parent8f3b601bcceeee924190f6983dc517fdcf02ea62 (diff)
perf: cache parser file list for performance
Diffstat (limited to 'lua/nvim-treesitter/install.lua')
-rw-r--r--lua/nvim-treesitter/install.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua
index e8c6cf86..eac4af7e 100644
--- a/lua/nvim-treesitter/install.lua
+++ b/lua/nvim-treesitter/install.lua
@@ -59,6 +59,8 @@ local function iter_cmd_sync(cmd_list)
end
local function run_install(cache_folder, package_path, lang, repo, with_sync)
+ parsers.reset_cache()
+
local project_name = 'tree-sitter-'..lang
local project_repo = cache_folder..'/'..project_name
-- compile_location only needed for typescript installs.