mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -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
|
---@field queries? string
|
||||||
---
|
---
|
||||||
---Envrionment variables for generating the parser
|
---Envrionment variables for generating the parser
|
||||||
---@field env table<string, string|number>
|
---@field env? table<string, string|number>
|
||||||
|
|
||||||
---@class ParserInfo
|
---@class ParserInfo
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ end
|
||||||
---@param compile_location string
|
---@param compile_location string
|
||||||
---@return string? err
|
---@return string? err
|
||||||
local function do_generate(logger, repo, compile_location)
|
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
|
local from_json = true
|
||||||
if repo.generate_from_json == false then
|
if repo.generate_from_json == false then
|
||||||
from_json = false
|
from_json = false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue