diff --git a/lua/nvim-treesitter/_meta/parsers.lua b/lua/nvim-treesitter/_meta/parsers.lua index 54b613699..4850ff9c2 100644 --- a/lua/nvim-treesitter/_meta/parsers.lua +++ b/lua/nvim-treesitter/_meta/parsers.lua @@ -28,7 +28,7 @@ error('Cannot require a meta file') ---@field queries? string --- ---Envrionment variables for generating the parser ----@field env table +---@field env? table ---@class ParserInfo --- diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 82cb1cf6e..fa44d1932 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -167,7 +167,7 @@ end ---@param compile_location string ---@return string? err local function do_generate(logger, repo, compile_location) - local env = vim.tbl_extend('force', { TREE_SITTER_JS_RUNTIME = 'native' }, repo.env) + local env = vim.tbl_extend('force', { TREE_SITTER_JS_RUNTIME = 'native' }, repo.env or {}) local from_json = true if repo.generate_from_json == false then from_json = false