aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/health.lua10
-rw-r--r--lua/nvim-treesitter/install.lua44
-rw-r--r--lua/nvim-treesitter/parsers.lua327
3 files changed, 195 insertions, 186 deletions
diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua
index 1d6400977..5d3a23300 100644
--- a/lua/nvim-treesitter/health.lua
+++ b/lua/nvim-treesitter/health.lua
@@ -37,16 +37,8 @@ local function install_health()
)
end
- if vim.fn.executable('node') == 0 then
- health.warn('`node` executable not found (only needed for `:TSInstallFromGrammar`.')
- else
- local result = assert(vim.system({ 'node', '--version' }):wait().stdout)
- local version = vim.split(result, '\n')[1]
- health.ok('`node` found ' .. version .. ' (only needed for `:TSInstallFromGrammar`)')
- end
-
if vim.fn.executable('git') == 0 then
- health.error(
+ health.warn(
'`git` executable not found.',
'Install it with your package manager and check that your `$PATH` is set correctly.'
)
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua
index 57671d7d3..c501b0fa0 100644
--- a/lua/nvim-treesitter/install.lua
+++ b/lua/nvim-treesitter/install.lua
@@ -31,7 +31,7 @@ local M = {}
---@type table<string, LockfileInfo>
local lockfile = {}
-local max_jobs = 50
+local max_jobs = 10
local iswin = uv.os_uname().sysname == 'Windows_NT'
local ismac = uv.os_uname().sysname == 'Darwin'
@@ -145,24 +145,17 @@ end
--- @param repo InstallInfo
--- @param compile_location string
--- @return string? err
-local function do_generate_from_grammar(logger, repo, compile_location)
+local function do_generate(logger, repo, compile_location)
if not executable('tree-sitter') then
return logger:error('tree-sitter CLI not found: `tree-sitter` is not executable')
end
- if repo.generate_requires_npm then
- if not executable('npm') then
- return logger:error('NPM requires to be installed from grammar.js')
- end
-
- logger:info('Installing NPM dependencies')
- local r = system({ 'npm', 'install' }, { cwd = compile_location })
- if r.code > 0 then
- return logger:error('Error during `npm install`: %s', r.stderr)
- end
- end
-
- logger:info('Generating source files from grammar.js...')
+ logger:info(
+ string.format(
+ 'Generating parser.c from %s...',
+ repo.generate_from_json and 'grammar.json' or 'grammar.js'
+ )
+ )
local r = system({
fn.exepath('tree-sitter'),
@@ -170,6 +163,7 @@ local function do_generate_from_grammar(logger, repo, compile_location)
'--no-bindings',
'--abi',
tostring(vim.treesitter.language_version),
+ repo.generate_from_json and 'src/grammar.json',
}, { cwd = compile_location })
if r.code > 0 then
return logger:error('Error during "tree-sitter generate": %s', r.stderr)
@@ -262,6 +256,10 @@ end
---@param project_dir string
---@return string? err
local function do_download_git(logger, repo, project_name, cache_dir, revision, project_dir)
+ if not executable('git') then
+ return logger:error('git not found!')
+ end
+
logger:info('Downloading ' .. project_name .. '...')
local r = system({
@@ -386,7 +384,7 @@ end
---@param repo InstallInfo
---@param cc string
---@param compile_location string
---- @return string? err
+---@return string? err
local function do_compile(logger, repo, cc, compile_location)
local args = vim.tbl_flatten(select_compiler_args(repo, cc))
local cmd = vim.list_extend({ cc }, args)
@@ -442,7 +440,7 @@ local function install_lang0(lang, cache_dir, install_dir, generate)
do
if repo.generate or generate then
- local err = do_generate_from_grammar(logger, repo, compile_location)
+ local err = do_generate(logger, repo, compile_location)
if err then
return err
end
@@ -497,9 +495,9 @@ local INSTALL_TIMEOUT = 60000
---@param cache_dir string
---@param install_dir string
---@param force? boolean
----@param generate_from_grammar? boolean
+---@param generate? boolean
---@return InstallStatus status
-local function install_lang(lang, cache_dir, install_dir, force, generate_from_grammar)
+local function install_lang(lang, cache_dir, install_dir, force, generate)
if not force and vim.list_contains(config.installed_parsers(), lang) then
local yesno = fn.input(lang .. ' parser already available: would you like to reinstall ? y/n: ')
print('\n ')
@@ -518,7 +516,7 @@ local function install_lang(lang, cache_dir, install_dir, force, generate_from_g
end
else
install_status[lang] = 'installing'
- local err = install_lang0(lang, cache_dir, install_dir, generate_from_grammar)
+ local err = install_lang0(lang, cache_dir, install_dir, generate)
install_status[lang] = err and 'failed' or 'installed'
end
@@ -529,7 +527,7 @@ end
---@class InstallOptions
---@field force? boolean
----@field generate_from_grammar? boolean
+---@field generate? boolean
---@field skip? table
--- Install a parser
@@ -539,7 +537,7 @@ end
local function install(languages, options, _callback)
options = options or {}
local force = options.force
- local generate_from_grammar = options.generate_from_grammar
+ local generate = options.generate
local skip = options.skip
local cache_dir = vim.fs.normalize(fn.stdpath('cache'))
@@ -560,7 +558,7 @@ local function install(languages, options, _callback)
for _, lang in ipairs(languages) do
tasks[#tasks + 1] = a.sync(function()
a.main()
- local status = install_lang(lang, cache_dir, install_dir, force, generate_from_grammar)
+ local status = install_lang(lang, cache_dir, install_dir, force, generate)
if status ~= 'failed' then
done = done + 1
end
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index 6f5915da1..4e3222563 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -4,8 +4,8 @@
---@field branch? string
---@field revision? string
---@field files string[]
----@field generate_requires_npm? boolean
---@field generate? boolean
+---@field generate_from_json? boolean
---@field location? string
---@class ParserInfo
@@ -36,18 +36,18 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@Decodetalkers' },
- tier = 3,
+ tier = 2,
},
angular = {
install_info = {
url = 'https://github.com/dlvandenberg/tree-sitter-angular',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@dlvandenberg' },
requires = { 'html', 'html_tags' },
- tier = 4,
+ tier = 3,
},
apex = {
@@ -62,8 +62,9 @@ M.configs = {
arduino = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-arduino',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-arduino',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@ObserverOfTime' },
requires = { 'cpp' },
@@ -83,6 +84,7 @@ M.configs = {
install_info = {
url = 'https://github.com/virchau13/tree-sitter-astro',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@virchau13' },
requires = { 'html', 'html_tags' },
@@ -112,7 +114,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@TravonteD' },
- tier = 3,
+ tier = 1,
},
bass = {
@@ -121,7 +123,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
beancount = {
@@ -139,12 +141,12 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@theHamsta', '@clason' },
- tier = 2,
+ tier = 3,
},
bicep = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-bicep',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-bicep',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -153,7 +155,7 @@ M.configs = {
bitbake = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-bitbake',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-bitbake',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -209,12 +211,12 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
- tier = 3,
+ tier = 2,
},
cairo = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-cairo',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-cairo',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -232,7 +234,7 @@ M.configs = {
capnp = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-capnp',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-capnp',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -241,7 +243,7 @@ M.configs = {
chatito = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-chatito',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-chatito',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -272,7 +274,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@uyha' },
- tier = 4,
+ tier = 3,
},
comment = {
@@ -281,14 +283,14 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@stsewd' },
- tier = 2,
+ tier = 3,
},
commonlisp = {
install_info = {
- url = 'https://github.com/theHamsta/tree-sitter-commonlisp',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-commonlisp',
files = { 'src/parser.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@theHamsta' },
tier = 2,
@@ -314,7 +316,7 @@ M.configs = {
cpon = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-cpon',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-cpon',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -325,11 +327,11 @@ M.configs = {
install_info = {
url = 'https://github.com/tree-sitter/tree-sitter-cpp',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@theHamsta' },
requires = { 'c' },
- tier = 1,
+ tier = 2,
},
css = {
@@ -338,12 +340,12 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@TravonteD' },
- tier = 3,
+ tier = 2,
},
csv = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-csv',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-csv',
files = { 'src/parser.c' },
location = 'csv',
},
@@ -354,9 +356,9 @@ M.configs = {
cuda = {
install_info = {
- url = 'https://github.com/theHamsta/tree-sitter-cuda',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-cuda',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@theHamsta' },
requires = { 'cpp' },
@@ -369,7 +371,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
cylc = {
@@ -386,7 +388,7 @@ M.configs = {
url = 'https://github.com/gdamore/tree-sitter-d',
files = { 'src/parser.c', 'src/scanner.c' },
},
- tier = 2,
+ tier = 3,
maintainers = { '@amaanq' },
},
@@ -396,7 +398,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@akinsho' },
- tier = 4,
+ tier = 3,
},
desktop = {
@@ -423,7 +425,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
diff = {
@@ -473,7 +475,7 @@ M.configs = {
doxygen = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-doxygen',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-doxygen',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -498,6 +500,7 @@ M.configs = {
maintainers = { '@glehmann' },
tier = 3,
},
+
ebnf = {
install_info = {
url = 'https://github.com/RubixDev/ebnf',
@@ -505,13 +508,13 @@ M.configs = {
location = 'crates/tree-sitter-ebnf',
},
maintainers = { '@RubixDev' },
- tier = 4,
+ tier = 3,
},
ecma = {
maintainers = { '@steelsojka' },
readme_note = 'queries required by javascript, typescript, tsx, qmljs',
- tier = 2,
+ tier = 3,
},
editorconfig = {
@@ -556,7 +559,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@zweimach' },
- tier = 4,
+ tier = 3,
},
elsa = {
@@ -565,7 +568,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@glapa-grossklag', '@amaanq' },
- tier = 2,
+ tier = 3,
},
elvish = {
@@ -625,7 +628,7 @@ M.configs = {
install_info = {
url = 'https://github.com/alexmozaidze/tree-sitter-fennel',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@alexmozaidze' },
tier = 3,
@@ -642,7 +645,7 @@ M.configs = {
firrtl = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-firrtl',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-firrtl',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -673,7 +676,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
fortran = {
@@ -682,7 +685,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
fsh = {
@@ -706,7 +709,7 @@ M.configs = {
func = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-func',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-func',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -773,7 +776,7 @@ M.configs = {
gitattributes = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-gitattributes',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-gitattributes',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -795,7 +798,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
gitignore = {
@@ -804,7 +807,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@theHamsta' },
- tier = 2,
+ tier = 3,
},
gleam = {
@@ -813,7 +816,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
glimmer = {
@@ -850,9 +853,9 @@ M.configs = {
glsl = {
install_info = {
- url = 'https://github.com/theHamsta/tree-sitter-glsl',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-glsl',
files = { 'src/parser.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@theHamsta' },
requires = { 'c' },
@@ -861,7 +864,7 @@ M.configs = {
gn = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-gn',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-gn',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -884,7 +887,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@theHamsta', '@WinWisely268' },
- tier = 1,
+ tier = 2,
},
goctl = {
@@ -917,7 +920,7 @@ M.configs = {
gosum = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-go-sum',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-go-sum',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -953,7 +956,7 @@ M.configs = {
gpg = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-gpg-config',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-gpg-config',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -980,7 +983,7 @@ M.configs = {
gstlaunch = {
install_info = {
- url = 'https://github.com/theHamsta/tree-sitter-gstlaunch',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-gstlaunch',
files = { 'src/parser.c' },
},
maintainers = { '@theHamsta' },
@@ -997,7 +1000,7 @@ M.configs = {
hare = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-hare',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-hare',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -1010,7 +1013,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@mrcjkb' },
- tier = 3,
+ tier = 2,
},
haskell_persistent = {
@@ -1024,11 +1027,11 @@ M.configs = {
hcl = {
install_info = {
- url = 'https://github.com/MichaHoffmann/tree-sitter-hcl',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-hcl',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@MichaHoffmann' },
- tier = 3,
+ tier = 2,
},
heex = {
@@ -1054,7 +1057,7 @@ M.configs = {
install_info = {
url = 'https://github.com/winston0410/tree-sitter-hjson',
files = { 'src/parser.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@winston0410' },
requires = { 'json' },
@@ -1063,9 +1066,9 @@ M.configs = {
hlsl = {
install_info = {
- url = 'https://github.com/theHamsta/tree-sitter-hlsl',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-hlsl',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@theHamsta' },
requires = { 'cpp' },
@@ -1085,7 +1088,7 @@ M.configs = {
install_info = {
url = 'https://github.com/antosha417/tree-sitter-hocon',
files = { 'src/parser.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@antosha417' },
tier = 4,
@@ -1097,7 +1100,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@urbit-pilled' },
- tier = 4,
+ tier = 3,
},
html_tags = {
@@ -1113,7 +1116,7 @@ M.configs = {
},
maintainers = { '@TravonteD' },
requires = { 'html_tags' },
- tier = 3,
+ tier = 2,
},
htmldjango = {
@@ -1122,7 +1125,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
- tier = 4,
+ tier = 3,
},
http = {
@@ -1131,7 +1134,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@amaanq', '@NTBBloodbath' },
- tier = 2,
+ tier = 3,
},
hurl = {
@@ -1145,11 +1148,11 @@ M.configs = {
hyprlang = {
install_info = {
- url = 'https://github.com/luckasRanarison/tree-sitter-hyprlang',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-hyprlang',
files = { 'src/parser.c' },
},
maintainers = { '@luckasRanarison' },
- tier = 3,
+ tier = 2,
},
idl = {
@@ -1176,7 +1179,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@theHamsta' },
- tier = 4,
+ tier = 3,
},
inko = {
@@ -1199,13 +1202,13 @@ M.configs = {
ispc = {
install_info = {
- url = 'https://github.com/fab4100/tree-sitter-ispc',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-ispc',
files = { 'src/parser.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@fab4100' },
requires = { 'c' },
- tier = 3,
+ tier = 2,
},
janet_simple = {
@@ -1223,7 +1226,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@p00f' },
- tier = 3,
+ tier = 2,
},
javadoc = {
@@ -1273,7 +1276,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
- tier = 2,
+ tier = 3,
},
jsdoc = {
@@ -1307,7 +1310,7 @@ M.configs = {
install_info = {
url = 'https://gitlab.com/WhyNotHugo/tree-sitter-jsonc.git',
files = { 'src/parser.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@WhyNotHugo' },
requires = { 'json' },
@@ -1326,7 +1329,7 @@ M.configs = {
jsx = {
maintainers = { '@steelsojka' },
readme_note = 'queries required by javascript, tsx',
- tier = 2,
+ tier = 3,
},
julia = {
@@ -1358,7 +1361,7 @@ M.configs = {
kconfig = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-kconfig',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-kconfig',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -1367,7 +1370,7 @@ M.configs = {
kdl = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-kdl',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-kdl',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -1417,7 +1420,7 @@ M.configs = {
generate = true,
},
maintainers = { '@theHamsta', '@clason' },
- tier = 2,
+ tier = 3,
},
ledger = {
@@ -1449,7 +1452,7 @@ M.configs = {
linkerscript = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-linkerscript',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-linkerscript',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -1476,7 +1479,7 @@ M.configs = {
lua = {
install_info = {
- url = 'https://github.com/MunifTanjim/tree-sitter-lua',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-lua',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@muniftanjim' },
@@ -1485,7 +1488,7 @@ M.configs = {
luadoc = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-luadoc',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-luadoc',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -1494,7 +1497,7 @@ M.configs = {
luap = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-luap',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-luap',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -1504,8 +1507,9 @@ M.configs = {
luau = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-luau',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-luau',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@amaanq' },
requires = { 'lua' },
@@ -1527,12 +1531,12 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@lewis6991' },
- tier = 2,
+ tier = 3,
},
markdown = {
install_info = {
- url = 'https://github.com/MDeiml/tree-sitter-markdown',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-markdown',
location = 'tree-sitter-markdown',
files = { 'src/parser.c', 'src/scanner.c' },
},
@@ -1544,7 +1548,7 @@ M.configs = {
markdown_inline = {
install_info = {
- url = 'https://github.com/MDeiml/tree-sitter-markdown',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-markdown',
location = 'tree-sitter-markdown-inline',
files = { 'src/parser.c', 'src/scanner.c' },
},
@@ -1581,11 +1585,11 @@ M.configs = {
meson = {
install_info = {
- url = 'https://github.com/Decodetalkers/tree-sitter-meson',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-meson',
files = { 'src/parser.c' },
},
maintainers = { '@Decodetalkers' },
- tier = 3,
+ tier = 2,
},
mlir = {
@@ -1595,7 +1599,7 @@ M.configs = {
generate = true,
},
maintainers = { '@artagnon' },
- tier = 4,
+ tier = 3,
},
muttrc = {
@@ -1613,7 +1617,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
- tier = 2,
+ tier = 3,
},
nginx = {
@@ -1672,8 +1676,9 @@ M.configs = {
nqc = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-nqc',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-nqc',
files = { 'src/parser.c' },
+ generate_from_json = true,
},
maintainers = { '@amaanq' },
tier = 2,
@@ -1690,8 +1695,9 @@ M.configs = {
objc = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-objc',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-objc',
files = { 'src/parser.c' },
+ generate_from_json = true,
},
maintainers = { '@amaanq' },
requires = { 'c' },
@@ -1714,7 +1720,7 @@ M.configs = {
location = 'grammars/ocaml',
},
maintainers = { '@undu' },
- tier = 3,
+ tier = 2,
},
ocaml_interface = {
@@ -1725,7 +1731,7 @@ M.configs = {
},
maintainers = { '@undu' },
requires = { 'ocaml' },
- tier = 3,
+ tier = 2,
},
ocamllex = {
@@ -1740,7 +1746,7 @@ M.configs = {
odin = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-odin',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-odin',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -1767,7 +1773,7 @@ M.configs = {
pem = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-pem',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-pem',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -1779,6 +1785,7 @@ M.configs = {
url = 'https://github.com/tree-sitter-perl/tree-sitter-perl',
branch = 'release',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@RabbiVeesh', '@LeoNerd' },
tier = 3,
@@ -1793,7 +1800,7 @@ M.configs = {
maintainers = { '@tk-shirasaka', '@calebdw' },
requires = { 'php_only' },
readme_note = 'PHP with embedded HTML',
- tier = 3,
+ tier = 2,
},
php_only = {
@@ -1804,17 +1811,17 @@ M.configs = {
},
maintainers = { '@tk-shirasaka', '@calebdw' },
readme_note = 'PHP without embedded HTML',
- tier = 3,
+ tier = 2,
},
phpdoc = {
install_info = {
url = 'https://github.com/claytonrcarter/tree-sitter-phpdoc',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@mikehaertl' },
- tier = 4,
+ tier = 3,
},
pioasm = {
@@ -1828,7 +1835,7 @@ M.configs = {
po = {
install_info = {
- url = 'https://github.com/erasin/tree-sitter-po',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-po',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -1840,6 +1847,7 @@ M.configs = {
url = 'https://github.com/tree-sitter-perl/tree-sitter-pod',
files = { 'src/parser.c', 'src/scanner.c' },
branch = 'release',
+ generate_from_json = true,
},
maintainers = { '@RabbiVeesh', '@LeoNerd' },
tier = 3,
@@ -1847,17 +1855,17 @@ M.configs = {
poe_filter = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-poe-filter',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-poe-filter',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
readme_note = 'Path of Exile item filter',
- tier = 4,
+ tier = 2,
},
pony = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-pony',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-pony',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq', '@mfelsche' },
@@ -1876,7 +1884,7 @@ M.configs = {
printf = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-printf',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-printf',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -1915,7 +1923,7 @@ M.configs = {
properties = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-properties',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-properties',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -1938,7 +1946,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@MichaHoffmann' },
- tier = 4,
+ tier = 3,
},
prql = {
@@ -1947,12 +1955,12 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@matthias-Q' },
- tier = 2,
+ tier = 3,
},
psv = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-csv',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-csv',
files = { 'src/parser.c' },
location = 'psv',
},
@@ -1967,12 +1975,12 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@zealot128' },
- tier = 4,
+ tier = 3,
},
puppet = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-puppet',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-puppet',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -1990,7 +1998,7 @@ M.configs = {
pymanifest = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-pymanifest',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-pymanifest',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -2013,12 +2021,12 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@pwntester' },
- tier = 3,
+ tier = 2,
},
qmldir = {
install_info = {
- url = 'https://github.com/Decodetalkers/tree-sitter-qmldir',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-qmldir',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -2029,6 +2037,7 @@ M.configs = {
install_info = {
url = 'https://github.com/yuja/tree-sitter-qmljs',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@Decodetalkers' },
requires = { 'ecma' },
@@ -2037,7 +2046,7 @@ M.configs = {
query = {
install_info = {
- url = 'https://github.com/nvim-treesitter/tree-sitter-query',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-query',
files = { 'src/parser.c' },
},
maintainers = { '@steelsojka' },
@@ -2082,6 +2091,8 @@ M.configs = {
razor = {
install_info = {
+ generate_from_json = true,
+ revision = 'a47cd8ca148685629739a4ab69f58864800fbdab',
url = 'https://github.com/tris203/tree-sitter-razor',
files = { 'src/parser.c', 'src/scanner.c' },
},
@@ -2100,7 +2111,7 @@ M.configs = {
re2c = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-re2c',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-re2c',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
@@ -2109,11 +2120,11 @@ M.configs = {
readline = {
install_info = {
- url = 'https://github.com/ribru17/tree-sitter-readline',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-readline',
files = { 'src/parser.c' },
},
maintainers = { '@ribru17' },
- tier = 3,
+ tier = 2,
},
regex = {
@@ -2122,7 +2133,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@theHamsta' },
- tier = 1,
+ tier = 2,
},
rego = {
@@ -2136,7 +2147,7 @@ M.configs = {
requirements = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-requirements',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-requirements',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -2191,7 +2202,7 @@ M.configs = {
ron = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-ron',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-ron',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -2204,7 +2215,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@stsewd' },
- tier = 2,
+ tier = 3,
},
ruby = {
@@ -2213,7 +2224,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@TravonteD' },
- tier = 3,
+ tier = 2,
},
runescript = {
@@ -2240,7 +2251,7 @@ M.configs = {
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@stevanmilic' },
- tier = 3,
+ tier = 2,
},
scfg = {
@@ -2283,13 +2294,13 @@ M.configs = {
},
slang = {
install_info = {
- url = 'https://github.com/theHamsta/tree-sitter-slang',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-slang',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
readme_note = 'Shader Slang',
maintainers = { '@theHamsta' },
- tier = 4,
+ tier = 2,
},
slim = {
@@ -2323,9 +2334,10 @@ M.configs = {
install_info = {
url = 'https://github.com/osthomas/tree-sitter-snakemake',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
- maintainer = { '@osthomas' },
- tier = 4,
+ maintainers = { '@osthomas' },
+ tier = 3,
},
smithy = {
@@ -2334,7 +2346,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@amaanq', '@keynmol' },
- tier = 2,
+ tier = 3,
},
solidity = {
@@ -2343,7 +2355,7 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
soql = {
@@ -2379,6 +2391,7 @@ M.configs = {
install_info = {
url = 'https://github.com/GordianDziwis/tree-sitter-sparql',
files = { 'src/parser.c' },
+ generate_from_json = true,
},
maintainers = { '@GordianDziwis' },
tier = 3,
@@ -2389,6 +2402,7 @@ M.configs = {
url = 'https://github.com/derekstride/tree-sitter-sql',
files = { 'src/parser.c', 'src/scanner.c' },
branch = 'gh-pages',
+ generate_from_json = true,
},
maintainers = { '@derekstride' },
tier = 3,
@@ -2396,7 +2410,7 @@ M.configs = {
squirrel = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-squirrel',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-squirrel',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -2405,7 +2419,7 @@ M.configs = {
ssh_config = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-ssh-config',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-ssh-config',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -2414,8 +2428,9 @@ M.configs = {
starlark = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-starlark',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-starlark',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@amaanq' },
tier = 2,
@@ -2427,13 +2442,14 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@amaanq' },
- tier = 2,
+ tier = 3,
},
styled = {
install_info = {
url = 'https://github.com/mskelton/tree-sitter-styled',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@mskelton' },
tier = 3,
@@ -2471,6 +2487,7 @@ M.configs = {
install_info = {
url = 'https://github.com/tree-sitter-grammars/tree-sitter-svelte',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@amaanq' },
requires = { 'html_tags' },
@@ -2525,7 +2542,7 @@ M.configs = {
tablegen = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-tablegen',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-tablegen',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -2555,6 +2572,7 @@ M.configs = {
install_info = {
url = 'https://github.com/vrischmann/tree-sitter-templ',
files = { 'src/parser.c', 'src/scanner.c' },
+ generate_from_json = true,
},
maintainers = { '@vrischmann' },
tier = 3,
@@ -2600,7 +2618,7 @@ M.configs = {
thrift = {
install_info = {
- url = 'https://github.com/duskmoon314/tree-sitter-thrift',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-thrift',
files = { 'src/parser.c' },
},
maintainers = { '@amaanq', '@duskmoon314' },
@@ -2640,22 +2658,22 @@ M.configs = {
files = { 'src/parser.c' },
},
maintainers = { '@arnarg' },
- tier = 4,
+ tier = 3,
},
toml = {
install_info = {
url = 'https://github.com/tree-sitter-grammars/tree-sitter-toml',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@tk-shirasaka' },
- tier = 3,
+ tier = 2,
},
tsv = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-csv',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-csv',
files = { 'src/parser.c' },
location = 'tsv',
},
@@ -2668,7 +2686,7 @@ M.configs = {
url = 'https://github.com/tree-sitter/tree-sitter-typescript',
files = { 'src/parser.c', 'src/scanner.c' },
location = 'tsx',
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@steelsojka' },
requires = { 'ecma', 'jsx', 'typescript' },
@@ -2698,7 +2716,7 @@ M.configs = {
url = 'https://github.com/tree-sitter/tree-sitter-typescript',
files = { 'src/parser.c', 'src/scanner.c' },
location = 'typescript',
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@steelsojka' },
requires = { 'ecma' },
@@ -2734,7 +2752,7 @@ M.configs = {
udev = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-udev',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-udev',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -2743,11 +2761,11 @@ M.configs = {
ungrammar = {
install_info = {
- url = 'https://github.com/Philipp-M/tree-sitter-ungrammar',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-ungrammar',
files = { 'src/parser.c' },
},
maintainers = { '@Philipp-M', '@amaanq' },
- tier = 3,
+ tier = 2,
},
unison = {
@@ -2757,7 +2775,7 @@ M.configs = {
generate = true,
},
maintainers = { '@tapegram' },
- tier = 4,
+ tier = 3,
},
usd = {
@@ -2771,7 +2789,7 @@ M.configs = {
uxntal = {
install_info = {
- url = 'https://github.com/amaanq/tree-sitter-uxntal',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-uxntal',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@amaanq' },
@@ -2835,7 +2853,7 @@ M.configs = {
vim = {
install_info = {
- url = 'https://github.com/neovim/tree-sitter-vim',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-vim',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@clason' },
@@ -2865,6 +2883,7 @@ M.configs = {
url = 'https://github.com/tree-sitter-grammars/tree-sitter-vue',
files = { 'src/parser.c', 'src/scanner.c' },
branch = 'main',
+ generate_from_json = true,
},
maintainers = { '@WhyNotHugo', '@lucario387' },
requires = { 'html_tags' },
@@ -2891,9 +2910,9 @@ M.configs = {
wgsl_bevy = {
install_info = {
- url = 'https://github.com/theHamsta/tree-sitter-wgsl-bevy',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-wgsl-bevy',
files = { 'src/parser.c', 'src/scanner.c' },
- generate_requires_npm = true,
+ generate_from_json = true,
},
maintainers = { '@theHamsta' },
tier = 2,
@@ -2907,9 +2926,10 @@ M.configs = {
maintainers = { '@liamwh' },
tier = 3,
},
+
xcompose = {
install_info = {
- url = 'https://github.com/ObserverOfTime/tree-sitter-xcompose',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-xcompose',
files = { 'src/parser.c' },
},
maintainers = { '@ObserverOfTime' },
@@ -2957,11 +2977,11 @@ M.configs = {
yuck = {
install_info = {
- url = 'https://github.com/Philipp-M/tree-sitter-yuck',
+ url = 'https://github.com/tree-sitter-grammars/tree-sitter-yuck',
files = { 'src/parser.c', 'src/scanner.c' },
},
maintainers = { '@Philipp-M', '@amaanq' },
- tier = 3,
+ tier = 2,
},
zathurarc = {
@@ -3019,12 +3039,11 @@ function M.get_available(tier)
parsers
)
end
- if vim.fn.executable('tree-sitter') == 0 or vim.fn.executable('node') == 0 then
+ if vim.fn.executable('tree-sitter') == 0 then
parsers = vim.tbl_filter(
--- @param p string
function(p)
- return M.configs[p].install_info ~= nil
- and not M.configs[p].install_info.requires_generate_from_grammar
+ return M.configs[p].install_info ~= nil and not M.configs[p].install_info.generate
end,
parsers
)