Commit Graph

6066 Commits

Author SHA1 Message Date
Christian Clason
fa0bb30ebd feat(parsers): update gdscript, gitattributes, godot_resource, xresources, yaml, ocaml, koto, ocaml_interface, c, ini, mlir, scheme, slint, c3, r, clojure, desktop, editorconfig, fortran 2025-05-30 10:25:47 +02:00
Christian Clason
ff770d718b fix(install): don't print operation summary by default
Problem: People complain about noisy `install()`.

Solution: Gate operation summary behind `summary` install option
(default false, set to true for interactive `:TS*` commands).
2025-05-29 20:08:10 +02:00
Christian Clason
ce903fde5d feat(api): expose list of available and installed languages 2025-05-29 12:11:56 +02:00
Christian Clason
0860b9b107 fix(config): check both installed parsers and queries
Problem: Can't uninstall custom parsers without queries since
`installed_parsers` only iterates over installed queries (to include
query-only languages, and to avoid string manipulation).

Solution: Iterate over both queries and parsers to collect list of
installed languages (optionally only queries or only parsers).
2025-05-29 11:52:58 +02:00
Christian Clason
03c9048090 fix(install): only install queries for bundled parsers 2025-05-29 11:52:58 +02:00
Christian Clason
f9ab837ca1 fix(install): don't skip un-tiered parsers 2025-05-29 11:52:58 +02:00
Christian Buttner
c59004f1e0 feat: add c3 (#7891) 2025-05-28 23:04:10 +02:00
Noah Bogart
71d2fd1bd4 fix(just): do not restrict @function.call to explicit list (#7905) 2025-05-28 22:44:34 +02:00
Christian Clason
024e6c5e46 fix(queries): fix rebase errors on main 2025-05-28 14:35:36 +02:00
Christian Clason
0140c29b31 fix(health): only require ts>=v0.25 2025-05-27 15:25:49 +02:00
Marc Jakobi
dd63d7141f fix(haskell): properly set inline-python injection language 2025-05-27 14:17:05 +02:00
Christian Clason
61b0a05ec0 fix(install): create cache dir if not existing 2025-05-26 17:21:18 +02:00
Christian Clason
1043871ef4 fix(swift): mark as unmaintained
Prevent from updating parser with breaking changes until queries are
adapted.
2025-05-26 14:57:57 +02:00
Christian Clason
c1dfc39285 fix(config): prepend install_dir to rtp 2025-05-25 13:11:28 +02:00
Christian Clason
0d60a09252 fix(typst): restore missing injections 2025-05-25 10:51:44 +02:00
Christian Clason
354c30d2a2 feat(parsers): update desktop, dtd, editorconfig, janet_simple, liquid, c, v, perl, mlir, templ, vhdl, xml, xresources, yaml, tlaplus, cmake 2025-05-24 19:27:04 +02:00
Omar Valdez
652831b231 feat(bash): highlight variable argument for printf -v 2025-05-24 11:39:59 +02:00
Christian Clason
c78594ce06 ci(test): throttle all install steps 2025-05-22 19:50:31 +02:00
Christian Clason
011f02936f fix(install): return task object in API functions 2025-05-22 08:34:45 +02:00
Yorick Peterse
d08cf75e1b feat(inko): add scoping to the locals queries
This way tooling that makes use of these queries (e.g. snacks.nvim) is
aware of the scoping of Inko types and methods.
2025-05-22 07:47:03 +02:00
Christian Clason
b19b5ce171 docs: final update after rewrite
Make clear this is not the default branch
2025-05-21 09:15:29 +02:00
Christian Clason
40cbddedf7 feat(parsers): update markdown_inline, markdown, vimdoc, fsharp, pascal, racket, lua, scheme, gleam, ocamllex, query 2025-05-18 10:22:42 +02:00
Riley Bruins
168fe16cdd fix: tidy up some query mistakes
Revealed by the capture-less patterns lint
2025-05-18 09:46:27 +02:00
Christian Clason
a663e69447 feat(parsers): update javadoc, jq, hcl, query, smithy, earthfile, tcl, llvm, godot_resource, git_config, terraform, teal, gdscript, mlir 2025-05-16 18:33:52 +02:00
Lewis Russell
69371f0148 feat(install)!: migrate to latest async.nvim impl (#7856)
Provides significantly simpler blocking installation and update.
2025-05-16 18:33:52 +02:00
Christian Clason
7a4a35de3e refactor(indent): use `node:byte_length() 2025-05-16 15:00:37 +02:00
Christian Clason
b0a20057b0 feat(config)!: remove ignore_install
This was only useful for no longer supported `auto_install` option.
2025-05-16 08:48:27 +02:00
Christian Clason
864e75a85d fix(c,cpp,fsharp,idl,powershell,sql,systemtap): remove unneeded escapes 2025-05-13 18:12:58 +02:00
Christian Clason
25f08b82af fix(hcl): remove unnecessary escapes 2025-05-13 18:12:58 +02:00
Christian Clason
6b55bc0fab ci(test): remove parser cache
Since installation now installs parsers _and_ queries, caching parsers
doesn't allow skipping the installation step (and caching queries does
not pay off).
2025-05-13 18:12:58 +02:00
Christian Clason
e8bfe271b0 docs: update to rewrite
This updates

* README
* CONTRIBUTING
* the `:h nvim-treesitter` documentation

to the current state of `main`. It also adds a pull request template for
adding a new language.
2025-05-12 18:43:41 +02:00
Christian Clason
a7ab4381ae feat(parsers): update t32, query, markdown, markdown_inline, meson, hyprlang, mlir, cpp, cylc 2025-05-12 18:43:41 +02:00
Christian Clason
f10bcac66b feat(parsers): update vim, gren, comment, purescript, elm, matlab, javadoc, swift, godot_resource, query, vimdoc, ledger 2025-05-12 18:43:41 +02:00
Christian Clason
dc8f3415a7 feat!: update tier 1 parsers to versions 2025-05-12 18:43:41 +02:00
Christian Clason
18bb653917 feat(locals)!: remove locals module
Problem: `locals.lua` was neither used nor tested, and providing it goes
against the goal of nvim-treesitter not being a required dependency for
other plugins.

Solution: Remove the module and document that the queries are provided
as-is for limited backward compatibility only.
2025-05-12 18:43:41 +02:00
Christian Clason
53dccb3a77 feat(tests)!: new infrastructure based on makefile
Problem: Not easy to run all checks and tests locally. Redundant CI
workflows.

Solution: Separate CI into two workflows:
 * lint: Lua files (stylua, luals), query files (valid captures,
   predicates, directives using tsqueryls), docs
   (SUPPORTED_LANGUAGES.md) -- does not need parser installation
 * tests: parsers (ABI compatibility), query files (tsqueryls on
   Linux/macOS; nvim on Windows), highlight and indent tests (separated
   for better readability) -- needs parser installation (but only once)

Switch to https://github.com/nvim-treesitter/highlight-assertions fork
with ABI 15 support.

Run all tests (on Linux and macOS) through `make` (`formatlua`,
`checklua`, `lintquery`, `formatquery`, `checkquery`, `docs`, `tests`),
which downloads and caches all necessary dependencies.

Remove `update-readme` workflow (replaced by lint job on PRs).
2025-05-12 18:43:41 +02:00
Riley Bruins
4e906caca3 refactor(locals): fix type annotations and warnings 2025-05-12 18:43:40 +02:00
Christian Clason
afaf01ebd3 tests(angular): don' reset filetype
`htmlangular` filetype support is now included in Nvim, so don't set
the filetype.
2025-05-12 18:43:40 +02:00
Christian Clason
75ee7ff2f0 tests(gleam): fix assert tests that no longer parse correctly 2025-05-12 18:43:40 +02:00
Christian Clason
a83f2d1417 feat(vim): update parser and queries
* add support for `:substitute` command
* add support for `=` lua chunks
2025-05-12 18:43:40 +02:00
Christian Clason
3d0e642764 feat(gdscript)!: update parser and queries
`(underscore)` node was removed
2025-05-12 18:43:40 +02:00
Christian Clason
f7c5f7de55 feat(parsers): update robot, earthfile, racket, javadoc, scheme, t32, tact, templ, kotlin, tcl, meson, mlir 2025-05-12 18:43:40 +02:00
Christian Clason
11736494df fix(indent): don't skip parsing for yaml 2025-05-12 18:43:40 +02:00
Christian Clason
44bb06bc12 chore: remove lockfile and update script
`main` branch and `parsers.lua` is the record of truth now
2025-05-12 18:43:40 +02:00
Christian Clason
53d7118483 refactor(lua): fix some luals warnings 2025-05-12 18:43:40 +02:00
Christian Clason
bdc2e01958 feat(install)!: always generate from json if possible 2025-05-12 18:43:40 +02:00
Christian Clason
522e0c6991 feat(setup)!: remove ensure_install field
Instead, call `require('nvim-treesitter').install( { ... } )` manually.

This gives users full control over how they want to install parsers
(sync, from grammar, limited concurrency) and obviates the need for
calling `setup` for most users.
2025-05-12 18:43:40 +02:00
Christian Clason
73adbe597e feat(parsers): update swift, tact, tcl, templ, mlir, kotlin, koto, elixir, php_only, ocaml, ocaml_interface, php, astro, slang, slim, blade, gleam, v, ledger 2025-05-12 18:43:40 +02:00
Christian Clason
037ac775e1 feat: add .tsqueryrc.json 2025-05-12 18:43:40 +02:00
Christian Clason
ed1f573aae feat(parsers): update ziggy, ziggy_schema, bibtex, latex 2025-05-12 18:43:40 +02:00