mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix: env is optional field
This commit is contained in:
parent
ec0ec4a103
commit
b0b15b969b
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ error('Cannot require a meta file')
|
|||
---@field queries? string
|
||||
---
|
||||
---Envrionment variables for generating the parser
|
||||
---@field env table<string, string|number>
|
||||
---@field env? table<string, string|number>
|
||||
|
||||
---@class ParserInfo
|
||||
---
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue