Commit graph

1241 commits

Author SHA1 Message Date
Christian Clason
d5733ea2d1 feat(parsers): update ziggy, ziggy_schema, bibtex, latex 2025-05-06 10:34:45 +02:00
Christian Clason
35a2ddedb0 feat(tcl)!: update parser and queries 2025-05-06 10:34:45 +02:00
Christian Clason
dd943e51e7 feat(julia)!: update parser and queries 2025-05-06 10:34:45 +02:00
Christian Clason
1f503286ca feat(parsers): update nickel, sql, devicetree, dhall, htmldjango, t32, gap, javadoc, templ, jinja, tera, verilog, meson, mlir, typespec, wit, phpdoc, superhtml, git_config, swift, terraform, vim, koto, rasi, rescript, bp, enforce, erlang, jinja_inline, cmake, fennel, comment, slint, elm, rust, hcl 2025-05-06 10:34:45 +02:00
Christian Clason
345037b61b feat(html): use gsub for mimetype lookup 2025-05-06 10:34:45 +02:00
Christian Clason
953b3f87d2 fix(install): skip tier 4 parsers when installing and updating 2025-05-06 10:34:45 +02:00
Christian Clason
a9f833d648 fix(install): don't prompt on installed parsers (skip)
Use `:TSInstall!` or `force = true` to reinstall.
2025-05-06 10:34:45 +02:00
Christian Clason
00bdc2f516 fix(formatter): increase match limit
Problem: Some very long patterns were not formatted correctly.

Solution: Increase the match limit when iterating to 1024.
2025-05-06 10:34:45 +02:00
przepompownia
282aa43e6e feat(install): allow pass callback to update()
Problem: cannot run `:TSUpdate synchronously`

Solution: pass callback used after exiting jobs
(like in `install-parsers`).
2025-05-06 10:34:45 +02:00
Sebastian Lyng Johansen
c00aac79ca fix(install): early return if parser_info does not exist 2025-05-06 10:34:45 +02:00
Christian Clason
5bab74e46c feat(parsers): rework tiers
* stable: updates follow semver releases (todo)
* unstable: updates follow HEAD (default)
* unmaintained: no automatic updates
* unsupported: no updates, cannot be installed
2025-05-06 10:34:45 +02:00
Christian Clason
fcc11ed26b fix(ci): update to changed neovim release name 2025-05-06 10:34:45 +02:00
Christian Clason
ca296d4df1 fix(install): return error code in callback 2025-05-06 10:34:45 +02:00
Christian Clason
ee143f05d6 feat(install)!: bump minimum tree-sitter version to 0.24 2025-05-06 10:34:45 +02:00
Christian Clason
1b7718137d ci(tests): add optional workflow for generating grammars
run on PR by adding label `ci:generate` or manually
2025-05-06 10:34:45 +02:00
Christian Clason
437a3609d2 feat(install): allow specifying max jobs 2025-05-06 10:34:44 +02:00
Christian Clason
b87758d007 feat(config)!: remove auto_install
use https://github.com/lewis6991/ts-install.nvim instead
2025-05-06 10:34:44 +02:00
Christian Clason
7477cb2269 feat(install)!: drop support for git
Problem: Using git for installing parsers can lead to data loss if in a
git commit buffer.

Solution: Only support downloading via curl+tar, which are installed on
all supported platforms (since Windows 10). Curl will also be required
for WASM parsers (and for `vim.net.download()`).
2025-05-06 10:34:44 +02:00
Christian Clason
646ae66641 feat!: use tree-sitter build 2025-05-06 10:34:44 +02:00
Christian Clason
45cf60df05 feat!: track parser revision in Lua
Problem: Tracking parser revision in lockfile and allowing override
through the parsers module complicates the code. In addition, only
revision changes are handled robustly, not changes to other installation
info.

Solution: Track parser revision in the parsers module directly. Reload
parser table on every install or update call. Support modifying parser
table in a `User TSUpdate` autocommand.
2025-05-06 10:34:44 +02:00
Christian Clason
3274dbef12 fix: vim.tbl_flatten is deprecated 2025-05-06 10:34:44 +02:00
Christian Clason
62cfd26e78 feat(install)!: generate from json instead of requiring node
Problem: Many parsers require node/npm to evaluate the `grammar.js`
before being able to generate a parser from it.

Solution: Generate from `grammar.json` instead, which is fully resolved.
Drops `node` and `npm` as (optional) requirements for nvim-treesitter.

Note that this requires parsers to commit the generated json iff the
grammar requires evaluation (which is currently the case for all tracked
languages).
2025-05-06 10:34:44 +02:00
Christian Clason
e84e1df3d1 feat(install)!: add explicit path field to parser info (#6476)
Problem: Using `url` for both remote repo and local path complicates the
code.

Solution: Add `path` field that overrides `url` and bypasses
git-specific manipulations, i.e., the contents of the `path` are used
as-is (no git repo needed).

This means `:TSUpdate` will skip such parsers; use `:TSInstall!` instead
after making local changes.

---------

Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2025-05-06 10:34:44 +02:00
Lewis Russell
5764b8e745 fix: do not use vim.iter (#6469) 2025-05-06 10:34:44 +02:00
Lewis Russell
7d9df31e8e feat: improve logging of failed installs 2025-05-06 10:34:44 +02:00
Christian Clason
40d8d3bcaa feat(install)!: remove support for C++ scanners 2025-05-06 10:34:44 +02:00
Lewis Russell
e45f99a850 refactor: pull out predicate function 2025-05-06 10:34:44 +02:00
Lewis Russell
dc196db002 fix: update vim.system types 2025-05-06 10:34:44 +02:00
Lewis Russell
2ea2f73660 feat: allow a custom revision in install_info 2025-05-06 10:34:44 +02:00
Lewis Russell
52e4fc5b77 fix: cleanup diagnostics 2025-05-06 10:34:44 +02:00
Lewis Russell
42328bf9a3 fix: add stricter cc options (#5063) 2025-05-06 10:34:44 +02:00
TheLeoP
50795ed1b7 fix: always normalize paths
Not doing this results in paths with a mix of '\\' and '/' for Windows.
This isn't a problem when dealing with Neovim/luv APIs, but it is a
problem when comparing strings.
2025-05-06 10:34:44 +02:00
TheLeoP
528ba8cf44 fix: check if config has install_info in filter 2025-05-06 10:34:44 +02:00
Lewis Russell
8265a3568c fix: check queries in needs_update() 2025-05-06 10:34:44 +02:00
Lewis Russell
a7c208bd80 fix: filter languages through parser.configs 2025-05-06 10:34:44 +02:00
Christian Clason
ef6d7070c4 feat: add parser tiers
Tier 1: Stable
Tier 2: Core (maintained by org members)
Tier 3: Community (maintained by external contributors, to varying
degree)
Tier 4: Unsupported (lacking active maintainer or declared
experimental); skipped in lockfile update and ignored for automatic
install by default
2025-05-06 10:34:44 +02:00
Christian Clason
f614ec3566 feat!: drop makefile support, norg parser
Norg install_info and queries are maintained by neorg.

All other parsers are compatible with C++11, so fix that as standard.
(Can be bumped if all supported platforms support C++14.)

Remove Makefile support, as it's no longer needed.
2025-05-06 10:34:44 +02:00
Lewis Russell
cfae39609f refactor: use vim.system (#4923) 2025-05-06 10:34:44 +02:00
Christian Clason
c1d7d74278 fix: expand tiers in ignore_install 2025-05-06 10:34:44 +02:00
Christian Clason
a26beea342 feat: drop TSInstallInfo in favor of better checkhealth
also fixes the hole in install.compilers
2025-05-06 10:34:44 +02:00
Christian Clason
5fc5a9272a refactor: use vim.uv 2025-05-06 10:34:44 +02:00
Christian Clason
a9daf672e5 fix: install dependencies 2025-05-06 10:34:44 +02:00
Lewis Russell
0e36600235 refactor: rewrite installation using jobs and async
Replace sync variants with callback support
2025-05-06 10:34:44 +02:00
Christian Clason
c72fb9dc91 refactor: use vim.fs.joinpath 2025-05-06 10:34:44 +02:00
Christian Clason
4c8ba46f55 feat(locals)!: refactor locals.lua into standalone
Co-authored-by: TheLeoP <eugenio2305@hotmail.com>
2025-05-06 10:34:44 +02:00
Christian Clason
be0808844d feat!: drop modules, general refactor and cleanup 2025-05-06 10:34:44 +02:00
AJ Delcimmuto
7bbed4b548
feat(brightscript): brightscript parser and queries (#7780) 2025-04-13 13:20:09 -07:00
Vladimir Levin
9399bfd816
feat(caddy): add parser and queries (#7588)
---------

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2025-03-23 16:04:41 +00:00
Robert Muir
652da0b40f
feat(javadoc): add parser and queries (#7749)
Previously java was configured to use doxygen parser for documentation
comments, but javadocs are not doxygen. Inline tags have a different
syntax, block tags are not recognized, and doxygen creates a lot of
errors during highlighting.

Add parser for javadoc comments, with queries for highlights and
injections.
2025-03-23 16:44:12 +01:00
Caleb White
548ed98f8a
feat(blade): add laravel blade parser and queries (#7693) 2025-03-12 18:47:19 +01:00