fix(install): early return if parser_info does not exist

This commit is contained in:
Sebastian Lyng Johansen 2025-02-17 17:18:33 +01:00 committed by Christian Clason
parent a9f34d5a76
commit 02a1a0537c
3 changed files with 41 additions and 39 deletions

View file

@ -151,6 +151,7 @@ html_tags (queries only)[^html_tags] | unstable | `H IJ ` | @TravonteD
jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[julia](https://github.com/tree-sitter/tree-sitter-julia) | unstable | `HFIJL` | @fredrikekre [julia](https://github.com/tree-sitter/tree-sitter-julia) | unstable | `HFIJL` | @fredrikekre
[just](https://github.com/IndianBoy42/tree-sitter-just) | unstable | `HFIJL` | @Hubro [just](https://github.com/IndianBoy42/tree-sitter-just) | unstable | `HFIJL` | @Hubro
[kcl](https://github.com/kcl-lang/tree-sitter-kcl) | unstable | `HF J ` | @bertbaron
[kconfig](https://github.com/tree-sitter-grammars/tree-sitter-kconfig) | unstable | `HFIJL` | @amaanq [kconfig](https://github.com/tree-sitter-grammars/tree-sitter-kconfig) | unstable | `HFIJL` | @amaanq
[kdl](https://github.com/tree-sitter-grammars/tree-sitter-kdl) | unstable | `HFIJL` | @amaanq [kdl](https://github.com/tree-sitter-grammars/tree-sitter-kdl) | unstable | `HFIJL` | @amaanq
[kotlin](https://github.com/fwcd/tree-sitter-kotlin) | unstable | `HF JL` | @SalBakraa [kotlin](https://github.com/fwcd/tree-sitter-kotlin) | unstable | `HF JL` | @SalBakraa
@ -261,7 +262,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[sosl](https://github.com/aheber/tree-sitter-sfapex) | unstable | `H    ` | @aheber, @xixiafinland [sosl](https://github.com/aheber/tree-sitter-sfapex) | unstable | `H    ` | @aheber, @xixiafinland
[sourcepawn](https://github.com/nilshelmig/tree-sitter-sourcepawn) | unstable | `H  JL` | @Sarrus1 [sourcepawn](https://github.com/nilshelmig/tree-sitter-sourcepawn) | unstable | `H  JL` | @Sarrus1
[sparql](https://github.com/GordianDziwis/tree-sitter-sparql) | unstable | `HFIJL` | @GordianDziwis [sparql](https://github.com/GordianDziwis/tree-sitter-sparql) | unstable | `HFIJL` | @GordianDziwis
[sql](https://github.com/derekstride/tree-sitter-sql) | unstable | `H IJ ` | @derekstride [sql](https://github.com/derekstride/tree-sitter-sql) | unstable | `HFIJ ` | @derekstride
[squirrel](https://github.com/tree-sitter-grammars/tree-sitter-squirrel) | unstable | `HFIJL` | @amaanq [squirrel](https://github.com/tree-sitter-grammars/tree-sitter-squirrel) | unstable | `HFIJL` | @amaanq
[ssh_config](https://github.com/tree-sitter-grammars/tree-sitter-ssh-config) | unstable | `HFIJL` | @ObserverOfTime [ssh_config](https://github.com/tree-sitter-grammars/tree-sitter-ssh-config) | unstable | `HFIJL` | @ObserverOfTime
[starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) | unstable | `HFIJL` | @amaanq [starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) | unstable | `HFIJL` | @amaanq

View file

@ -91,6 +91,7 @@ local function get_parser_install_info(lang)
if not parser_config then if not parser_config then
log.error('Parser not available for language "' .. lang .. '"') log.error('Parser not available for language "' .. lang .. '"')
return
end end
return parser_config.install_info return parser_config.install_info

View file

@ -225,7 +225,7 @@ return {
}, },
cmake = { cmake = {
install_info = { install_info = {
revision = 'e409ae33f00e04cde30f2bcffb979caf1a33562a', revision = 'cd00bbcb77fe31283ca79b0038387ec7411759ae',
url = 'https://github.com/uyha/tree-sitter-cmake', url = 'https://github.com/uyha/tree-sitter-cmake',
}, },
maintainers = { '@uyha' }, maintainers = { '@uyha' },
@ -336,7 +336,7 @@ return {
}, },
dart = { dart = {
install_info = { install_info = {
revision = 'e81af6ab94a728ed99c30083be72d88e6d56cf9e', revision = '80e23c07b64494f7e21090bb3450223ef0b192f4',
url = 'https://github.com/UserNobody14/tree-sitter-dart', url = 'https://github.com/UserNobody14/tree-sitter-dart',
}, },
maintainers = { '@akinsho' }, maintainers = { '@akinsho' },
@ -384,7 +384,7 @@ return {
}, },
djot = { djot = {
install_info = { install_info = {
revision = '67e6e23ba7be81a4373e0f49e21207bdc32d12a5', revision = 'eb31845d59b9ee8c1b2098e78e9ca72004bd1579',
url = 'https://github.com/treeman/tree-sitter-djot', url = 'https://github.com/treeman/tree-sitter-djot',
}, },
maintainers = { '@NoahTheDuke' }, maintainers = { '@NoahTheDuke' },
@ -417,7 +417,7 @@ return {
dtd = { dtd = {
install_info = { install_info = {
location = 'dtd', location = 'dtd',
revision = '26e95de449d772bc2dd4f0382580f84e2a0754d6', revision = '2128a0b249263e238d88cb894dad00c3168fea37',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-xml', url = 'https://github.com/tree-sitter-grammars/tree-sitter-xml',
}, },
maintainers = { '@ObserverOfTime' }, maintainers = { '@ObserverOfTime' },
@ -425,7 +425,7 @@ return {
}, },
earthfile = { earthfile = {
install_info = { install_info = {
revision = '6695a2dfea5f8d9076b11f9bebcac8184e405e67', revision = 'ae378d9d1306e9a967698516041f6f8803db5592',
url = 'https://github.com/glehmann/tree-sitter-earthfile', url = 'https://github.com/glehmann/tree-sitter-earthfile',
}, },
maintainers = { '@glehmann' }, maintainers = { '@glehmann' },
@ -471,7 +471,7 @@ return {
}, },
elixir = { elixir = {
install_info = { install_info = {
revision = '86ec2ed45d6d9433b4e0b88cd3d96796bd45625f', revision = '450a8194f5a66561135962cfc8d7545a27b61c4c',
url = 'https://github.com/elixir-lang/tree-sitter-elixir', url = 'https://github.com/elixir-lang/tree-sitter-elixir',
}, },
maintainers = { '@connorlay' }, maintainers = { '@connorlay' },
@ -510,7 +510,7 @@ return {
}, },
enforce = { enforce = {
install_info = { install_info = {
revision = 'cf853e5f56f1babe5ec573e356f6fbb4784bf5c1', revision = '8201c3c354c34b96d5a531c8e63d262209ee06cb',
url = 'https://github.com/simonvic/tree-sitter-enforce', url = 'https://github.com/simonvic/tree-sitter-enforce',
}, },
maintainers = { '@simonvic' }, maintainers = { '@simonvic' },
@ -591,7 +591,7 @@ return {
}, },
fortran = { fortran = {
install_info = { install_info = {
revision = '022b032d31299c5d8336cdfd0ece97de20a609c0', revision = '21b740801794b6570a0380f8aef22bb67214ea65',
url = 'https://github.com/stadelmanma/tree-sitter-fortran', url = 'https://github.com/stadelmanma/tree-sitter-fortran',
}, },
maintainers = { '@amaanq' }, maintainers = { '@amaanq' },
@ -608,7 +608,7 @@ return {
fsharp = { fsharp = {
install_info = { install_info = {
location = 'fsharp', location = 'fsharp',
revision = 'ad824dea984734406b50699c5f388a7412e85946', revision = '02929f084726db969e5b916d144436f248146824',
url = 'https://github.com/ionide/tree-sitter-fsharp', url = 'https://github.com/ionide/tree-sitter-fsharp',
}, },
maintainers = { '@nsidorenco' }, maintainers = { '@nsidorenco' },
@ -1040,7 +1040,7 @@ return {
}, },
inko = { inko = {
install_info = { install_info = {
revision = '0b08a8f976456a9271f70d4682143328d7224115', revision = 'f58a87ac4dc6a7955c64c9e4408fbd693e804686',
url = 'https://github.com/inko-lang/tree-sitter-inko', url = 'https://github.com/inko-lang/tree-sitter-inko',
}, },
maintainers = { '@yorickpeterse' }, maintainers = { '@yorickpeterse' },
@ -1100,7 +1100,7 @@ return {
jinja = { jinja = {
install_info = { install_info = {
location = 'tree-sitter-jinja', location = 'tree-sitter-jinja',
revision = '41b17a33f335130ce9861fd21bffeb88fd768ef4', revision = '07a62adf99c0f41e0cab7ab523541309a8d73dc4',
url = 'https://github.com/cathaysia/tree-sitter-jinja', url = 'https://github.com/cathaysia/tree-sitter-jinja',
}, },
maintainers = { '@cathaysia' }, maintainers = { '@cathaysia' },
@ -1111,7 +1111,7 @@ return {
jinja_inline = { jinja_inline = {
install_info = { install_info = {
location = 'tree-sitter-jinja_inline', location = 'tree-sitter-jinja_inline',
revision = '41b17a33f335130ce9861fd21bffeb88fd768ef4', revision = '07a62adf99c0f41e0cab7ab523541309a8d73dc4',
url = 'https://github.com/cathaysia/tree-sitter-jinja', url = 'https://github.com/cathaysia/tree-sitter-jinja',
}, },
maintainers = { '@cathaysia' }, maintainers = { '@cathaysia' },
@ -1191,8 +1191,8 @@ return {
}, },
kcl = { kcl = {
install_info = { install_info = {
revision = 'b0b2eb38009e04035a6e266c7e11e541f3caab7c',
url = 'https://github.com/kcl-lang/tree-sitter-kcl', url = 'https://github.com/kcl-lang/tree-sitter-kcl',
files = { 'src/parser.c', 'src/scanner.c' },
}, },
maintainers = { '@bertbaron' }, maintainers = { '@bertbaron' },
tier = 2, tier = 2,
@ -1280,7 +1280,7 @@ return {
}, },
liquid = { liquid = {
install_info = { install_info = {
revision = '23ac814111e2b4b4b083e2c92219af2d5b74d13d', revision = '6e03a054a71cd419d9702725243137641e97ba51',
url = 'https://github.com/hankthetank27/tree-sitter-liquid', url = 'https://github.com/hankthetank27/tree-sitter-liquid',
}, },
maintainers = { '@hankthetank27' }, maintainers = { '@hankthetank27' },
@ -1399,7 +1399,7 @@ return {
}, },
meson = { meson = {
install_info = { install_info = {
revision = 'c5fffb8edd39f22644084ab3f73a924a75721ee3', revision = '12edaf0dfef0a43bc74336a4432b2db1c65788d6',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-meson', url = 'https://github.com/tree-sitter-grammars/tree-sitter-meson',
}, },
maintainers = { '@Decodetalkers' }, maintainers = { '@Decodetalkers' },
@ -1408,7 +1408,7 @@ return {
mlir = { mlir = {
install_info = { install_info = {
generate = true, generate = true,
revision = '9d83ca263fa7ec8ac7a5fd8ad14891b2dc583a32', revision = 'af14b427119a7428b461277bfc43abe5864d995d',
url = 'https://github.com/artagnon/tree-sitter-mlir', url = 'https://github.com/artagnon/tree-sitter-mlir',
}, },
maintainers = { '@artagnon' }, maintainers = { '@artagnon' },
@ -1472,7 +1472,7 @@ return {
}, },
nix = { nix = {
install_info = { install_info = {
revision = 'b3a88cf3e597d48c33657deca4fda7a75c0069c1', revision = '48057cf966641e7a49b09700550751195c34bcb5',
url = 'https://github.com/cstrahan/tree-sitter-nix', url = 'https://github.com/cstrahan/tree-sitter-nix',
}, },
maintainers = { '@leo60228' }, maintainers = { '@leo60228' },
@ -1489,7 +1489,7 @@ return {
}, },
nu = { nu = {
install_info = { install_info = {
revision = '2a153c88d5d44d96653057c7cc14292f4e641bef', revision = 'b99dc3b7b26337d84f95c0de4dda81077b03e5c7',
url = 'https://github.com/nushell/tree-sitter-nu', url = 'https://github.com/nushell/tree-sitter-nu',
}, },
maintainers = { '@abhisheksingh0x558' }, maintainers = { '@abhisheksingh0x558' },
@ -1516,7 +1516,7 @@ return {
ocaml = { ocaml = {
install_info = { install_info = {
location = 'grammars/ocaml', location = 'grammars/ocaml',
revision = '91e4d9106f5da8199ab5158ba65e02da3e664597', revision = 'db52ba3f7f33c9949bba115a813d7c30a359cd87',
url = 'https://github.com/tree-sitter/tree-sitter-ocaml', url = 'https://github.com/tree-sitter/tree-sitter-ocaml',
}, },
maintainers = { '@undu' }, maintainers = { '@undu' },
@ -1525,7 +1525,7 @@ return {
ocaml_interface = { ocaml_interface = {
install_info = { install_info = {
location = 'grammars/interface', location = 'grammars/interface',
revision = '91e4d9106f5da8199ab5158ba65e02da3e664597', revision = 'db52ba3f7f33c9949bba115a813d7c30a359cd87',
url = 'https://github.com/tree-sitter/tree-sitter-ocaml', url = 'https://github.com/tree-sitter/tree-sitter-ocaml',
}, },
maintainers = { '@undu' }, maintainers = { '@undu' },
@ -1551,7 +1551,7 @@ return {
}, },
pascal = { pascal = {
install_info = { install_info = {
revision = 'd0ebabefaea9ac3f6fc3004cf08cd121b66da9e4', revision = '78426d96bde7114af979e314283e45d087603428',
url = 'https://github.com/Isopod/tree-sitter-pascal', url = 'https://github.com/Isopod/tree-sitter-pascal',
}, },
maintainers = { '@Isopod' }, maintainers = { '@Isopod' },
@ -1586,7 +1586,7 @@ return {
php = { php = {
install_info = { install_info = {
location = 'php', location = 'php',
revision = 'f3a19ab3217a6e838870fc7142fa492d1fd7a7c9', revision = 'f7cf7348737d8cff1b13407a0bfedce02ee7b046',
url = 'https://github.com/tree-sitter/tree-sitter-php', url = 'https://github.com/tree-sitter/tree-sitter-php',
}, },
maintainers = { '@tk-shirasaka', '@calebdw' }, maintainers = { '@tk-shirasaka', '@calebdw' },
@ -1597,7 +1597,7 @@ return {
php_only = { php_only = {
install_info = { install_info = {
location = 'php_only', location = 'php_only',
revision = 'f3a19ab3217a6e838870fc7142fa492d1fd7a7c9', revision = 'f7cf7348737d8cff1b13407a0bfedce02ee7b046',
url = 'https://github.com/tree-sitter/tree-sitter-php', url = 'https://github.com/tree-sitter/tree-sitter-php',
}, },
maintainers = { '@tk-shirasaka', '@calebdw' }, maintainers = { '@tk-shirasaka', '@calebdw' },
@ -1659,7 +1659,7 @@ return {
powershell = { powershell = {
filetype = 'ps1', filetype = 'ps1',
install_info = { install_info = {
revision = '32fe49cc5d4a2d5a976dacafc0da16d98787866b', revision = 'e904962e25858b7e8e19c653e737ad3b7d1c55bd',
url = 'https://github.com/airbus-cert/tree-sitter-powershell', url = 'https://github.com/airbus-cert/tree-sitter-powershell',
}, },
maintainers = { '@L2jLiga' }, maintainers = { '@L2jLiga' },
@ -1853,7 +1853,7 @@ return {
razor = { razor = {
install_info = { install_info = {
generate_from_json = true, generate_from_json = true,
revision = 'a47cd8ca148685629739a4ab69f58864800fbdab', revision = 'fe46ce5ea7d844e53d59bc96f2175d33691c61c5',
url = 'https://github.com/tris203/tree-sitter-razor', url = 'https://github.com/tris203/tree-sitter-razor',
}, },
maintainers = { '@tris203' }, maintainers = { '@tris203' },
@ -1901,7 +1901,7 @@ return {
}, },
requirements = { requirements = {
install_info = { install_info = {
revision = '5ad9b7581b3334f6ad492847d007f2fac6e6e5f2', revision = '728910099ddea7f1f94ea95a35a70d1ea76a1639',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-requirements', url = 'https://github.com/tree-sitter-grammars/tree-sitter-requirements',
}, },
maintainers = { '@ObserverOfTime' }, maintainers = { '@ObserverOfTime' },
@ -1958,7 +1958,7 @@ return {
}, },
rst = { rst = {
install_info = { install_info = {
revision = '899e073a10012b8028b643d676c30bbf9c64a45d', revision = '4e562e1598b95b93db4f3f64fe40ddefbc677a15',
url = 'https://github.com/stsewd/tree-sitter-rst', url = 'https://github.com/stsewd/tree-sitter-rst',
}, },
maintainers = { '@stsewd' }, maintainers = { '@stsewd' },
@ -1982,7 +1982,7 @@ return {
}, },
rust = { rust = {
install_info = { install_info = {
revision = '2eaf126458a4d6a69401089b6ba78c5e5d6c1ced', revision = '02da1b25f6dfc7341ddb80f37f708cdd9301be2d',
url = 'https://github.com/tree-sitter/tree-sitter-rust', url = 'https://github.com/tree-sitter/tree-sitter-rust',
}, },
maintainers = { '@amaanq' }, maintainers = { '@amaanq' },
@ -2043,7 +2043,7 @@ return {
}, },
slim = { slim = {
install_info = { install_info = {
revision = 'a0f08e85b787248219ea645423c5916c8d620ef6', revision = '546e3aa1af8a3b355c7734efccd9a759ffc0b43a',
url = 'https://github.com/theoo/tree-sitter-slim', url = 'https://github.com/theoo/tree-sitter-slim',
}, },
maintainers = { '@theoo' }, maintainers = { '@theoo' },
@ -2171,7 +2171,7 @@ return {
styled = { styled = {
install_info = { install_info = {
generate_from_json = true, generate_from_json = true,
revision = '75d3ad20818c30c49b445ca2cb35999c278b3453', revision = '319cdcaa0346ba6db668a222d938e5c3569e2a51',
url = 'https://github.com/mskelton/tree-sitter-styled', url = 'https://github.com/mskelton/tree-sitter-styled',
}, },
maintainers = { '@mskelton' }, maintainers = { '@mskelton' },
@ -2188,7 +2188,7 @@ return {
superhtml = { superhtml = {
install_info = { install_info = {
location = 'tree-sitter-superhtml', location = 'tree-sitter-superhtml',
revision = '9266b3131bbcc0705b3b752bcb7478871a143740', revision = '15ff939100f9d52342445407973f3ce125a8437e',
url = 'https://github.com/kristoff-it/superhtml', url = 'https://github.com/kristoff-it/superhtml',
}, },
maintainers = { '@rockorager' }, maintainers = { '@rockorager' },
@ -2223,7 +2223,7 @@ return {
swift = { swift = {
install_info = { install_info = {
generate = true, generate = true,
revision = '1ebc09c38f41d6aab7dd65ca0f8ea032ced0364f', revision = '42ad8f6b4dc9b46285893cc37b460323b54932d4',
url = 'https://github.com/alex-pinkus/tree-sitter-swift', url = 'https://github.com/alex-pinkus/tree-sitter-swift',
}, },
maintainers = { '@alex-pinkus' }, maintainers = { '@alex-pinkus' },
@ -2339,7 +2339,7 @@ return {
}, },
tlaplus = { tlaplus = {
install_info = { install_info = {
revision = 'd711f24c93221cdfc9a9b4dbb0998f528fc982ac', revision = '4ba91b07b97741a67f61221d0d50e6d962e4987e',
url = 'https://github.com/tlaplus-community/tree-sitter-tlaplus', url = 'https://github.com/tlaplus-community/tree-sitter-tlaplus',
}, },
maintainers = { '@ahelwer', '@susliko' }, maintainers = { '@ahelwer', '@susliko' },
@ -2485,7 +2485,7 @@ return {
v = { v = {
install_info = { install_info = {
location = 'tree_sitter_v', location = 'tree_sitter_v',
revision = '1047c9d876451c3fcf78343fff26cdfff3855b8c', revision = '532bebd50742ef15949bdd67c36d46697c847628',
url = 'https://github.com/vlang/v-analyzer', url = 'https://github.com/vlang/v-analyzer',
}, },
maintainers = { '@kkharji', '@amaanq' }, maintainers = { '@kkharji', '@amaanq' },
@ -2517,7 +2517,7 @@ return {
}, },
vhdl = { vhdl = {
install_info = { install_info = {
revision = 'cfc522af3e49c1a00ae74e01aa14e19818dab8f2', revision = 'db1d7446bd07d811981734cd501fe1994cbad99d',
url = 'https://github.com/jpt13653903/tree-sitter-vhdl', url = 'https://github.com/jpt13653903/tree-sitter-vhdl',
}, },
maintainers = { '@jpt13653903' }, maintainers = { '@jpt13653903' },
@ -2610,7 +2610,7 @@ return {
xml = { xml = {
install_info = { install_info = {
location = 'xml', location = 'xml',
revision = '26e95de449d772bc2dd4f0382580f84e2a0754d6', revision = '2128a0b249263e238d88cb894dad00c3168fea37',
url = 'https://github.com/tree-sitter-grammars/tree-sitter-xml', url = 'https://github.com/tree-sitter-grammars/tree-sitter-xml',
}, },
maintainers = { '@ObserverOfTime' }, maintainers = { '@ObserverOfTime' },
@ -2668,7 +2668,7 @@ return {
ziggy = { ziggy = {
install_info = { install_info = {
location = 'tree-sitter-ziggy', location = 'tree-sitter-ziggy',
revision = 'acf2b6b5aa8b9ce93f4a1ef1adf4e95c06db7831', revision = 'af41bdb5b1d64404c2ec7eb1d9de01083c0d2596',
url = 'https://github.com/kristoff-it/ziggy', url = 'https://github.com/kristoff-it/ziggy',
}, },
maintainers = { '@rockorager' }, maintainers = { '@rockorager' },
@ -2677,7 +2677,7 @@ return {
ziggy_schema = { ziggy_schema = {
install_info = { install_info = {
location = 'tree-sitter-ziggy-schema', location = 'tree-sitter-ziggy-schema',
revision = 'acf2b6b5aa8b9ce93f4a1ef1adf4e95c06db7831', revision = 'af41bdb5b1d64404c2ec7eb1d9de01083c0d2596',
url = 'https://github.com/kristoff-it/ziggy', url = 'https://github.com/kristoff-it/ziggy',
}, },
maintainers = { '@rockorager' }, maintainers = { '@rockorager' },