From 61b0a05ec07280540d839aa9edfb81a84048fdf2 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 26 May 2025 14:42:03 +0200 Subject: fix(install): create cache dir if not existing --- lua/nvim-treesitter/install.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua') diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 6d60b7921..e6933fe58 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -440,6 +440,10 @@ local function install(languages, options) options = options or {} local cache_dir = fs.normalize(fn.stdpath('cache')) + if not vim.uv.fs_stat(cache_dir) then + vim.fn.mkdir(cache_dir, 'p') + end + local install_dir = config.get_install_dir('parser') local task_funs = {} ---@type async.TaskFun[] -- cgit v1.2.3-70-g09d2