aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* fix(lua): fix some emmyluals warningsChristian Clason2025-12-063-11/+10
|
* chore: remove format-queries scriptChristian Clason2025-11-141-467/+0
| | | | | | The source of truth for formatting (according to make formatquery and CI) is now ts_query_ls, so remove the no longer required script to prevent divergence and bitrotting.
* feat(install): remove node requirementChristian Clason2025-10-301-7/+2
| | | | | | * supported parsers _must_ commit at least `grammar.json` * set `TREE_SITTER_JS_RUNTIME=native` when generating parser to use built-in quickjs instead of node (requires tree-sitter 0.26)
* fix(scripts): sort list of updated parsersChristian Clason2025-06-291-0/+1
|
* fix(check-queries): only show timings for existing queriesChristian Clason2025-05-301-2/+4
|
* fix(install): don't print operation summary by defaultChristian Clason2025-05-291-2/+2
| | | | | | | Problem: People complain about noisy `install()`. Solution: Gate operation summary behind `summary` install option (default false, set to true for interactive `:TS*` commands).
* feat(api): expose list of available and installed languagesChristian Clason2025-05-292-2/+2
|
* fix(config): check both installed parsers and queriesChristian Clason2025-05-292-2/+2
| | | | | | | | | 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).
* fix(install): create cache dir if not existingChristian Clason2025-05-261-3/+0
|
* fix(install): return task object in API functionsChristian Clason2025-05-221-2/+2
|
* feat(install)!: migrate to latest async.nvim impl (#7856)Lewis Russell2025-05-161-15/+8
| | | | Provides significantly simpler blocking installation and update.
* feat!: update tier 1 parsers to versionsChristian Clason2025-05-122-11/+42
|
* feat(tests)!: new infrastructure based on makefileChristian Clason2025-05-125-59/+41
| | | | | | | | | | | | | | | | | | | | | | 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).
* chore: remove lockfile and update scriptChristian Clason2025-05-121-22/+0
| | | | `main` branch and `parsers.lua` is the record of truth now
* refactor(lua): fix some luals warningsChristian Clason2025-05-125-24/+22
|
* feat(install)!: always generate from json if possibleChristian Clason2025-05-121-2/+7
|
* feat(setup)!: remove ensure_install fieldChristian Clason2025-05-121-3/+0
| | | | | | | | 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.
* fix(formatter): increase match limitChristian Clason2025-05-121-1/+1
| | | | | | Problem: Some very long patterns were not formatted correctly. Solution: Increase the match limit when iterating to 1024.
* feat(install): allow pass callback to `update()`przepompownia2025-05-121-6/+15
| | | | | | | Problem: cannot run `:TSUpdate synchronously` Solution: pass callback used after exiting jobs (like in `install-parsers`).
* feat(parsers): rework tiersChristian Clason2025-05-121-1/+1
| | | | | | | * stable: updates follow semver releases (todo) * unstable: updates follow HEAD (default) * unmaintained: no automatic updates * unsupported: no updates, cannot be installed
* fix(ci): update to changed neovim release nameChristian Clason2025-05-121-2/+2
|
* fix(install): return error code in callbackChristian Clason2025-05-121-4/+7
|
* feat(install): allow specifying max jobsChristian Clason2025-05-121-1/+4
|
* feat!: use tree-sitter buildChristian Clason2025-05-122-7/+3
|
* feat!: track parser revision in LuaChristian Clason2025-05-125-67/+90
| | | | | | | | | | | 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.
* feat(install)!: generate from json instead of requiring nodeChristian Clason2025-05-122-11/+20
| | | | | | | | | | | | 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).
* fix(format): update scripts to support nightly (#6126)Phạm Huy Hoàng2025-05-121-12/+27
| | | | No need for assert as the use is contained within the script only
* fix: better output for update-lockfileChristian Clason2025-05-121-13/+20
|
* feat: improve check-queriesChristian Clason2025-05-121-58/+39
|
* feat: add parser tiersChristian Clason2025-05-121-3/+4
| | | | | | | | | | 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
* feat!: drop makefile support, norg parserChristian Clason2025-05-121-52/+0
| | | | | | | | | 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.
* refactor: use vim.system (#4923)Lewis Russell2025-05-121-25/+40
|
* refactor: use `vim.uv`Christian Clason2025-05-122-50/+32
|
* fix: install dependenciesChristian Clason2025-05-122-24/+29
|
* ci: remove update-lockfile shell scriptChristian Clason2025-05-128-59/+45
|
* refactor: rewrite installation using jobs and asyncLewis Russell2025-05-122-15/+8
| | | | Replace sync variants with callback support
* refactor: use vim.fs.joinpathChristian Clason2025-05-121-1/+1
|
* feat(locals)!: refactor `locals.lua` into standaloneChristian Clason2025-05-121-0/+1
| | | | Co-authored-by: TheLeoP <eugenio2305@hotmail.com>
* feat!: drop modules, general refactor and cleanupChristian Clason2025-05-127-138/+220
|
* feat(formatter): support formatting missing nodesRiley Bruins2025-02-041-0/+11
| | | | | | | | | | | | | | | | | This commit makes missing nodes take formatting identical to that of regular named nodes, with the only exception being that a newline will not be prepended to a node name. E.g. this pattern: ```query (MISSING identifier) ``` will *not* be changed to: ```query (MISSING (identifier)) ```
* fix(formatter): prefer #-prefixed predicatesRiley Bruins2025-02-041-0/+3
| | | | | | This prevents the formatter for appending a space after the "." in a predicate prefix, and changes it to a "#" to match all other occurrences in the codebase.
* fix(ci): fixupChristian Clason2025-01-301-1/+1
|
* fix(ci): update to changed neovim release nameChristian Clason2025-01-301-8/+1
|
* ci(install): adapt to new Neovim release artefact namesChristian Clason2025-01-271-1/+8
| | | | Old name can be removed after 0.10.4 release
* fix: formatter idempotency for nested groupings (#7345)Riley Bruins2024-11-111-0/+1
| | | | | | Currently, for something like `(((((node))))) @cap`, the formatter will produce `((node)) @cap`, and then after another pass it will produce `(node) @cap`. This commit makes it so that all extraneous parentheses are removed on the first pass.
* fix(formatter): simplify code, remove odd line breakRiley Bruins2024-10-261-48/+26
|
* fix(formatter): adapt formatter for nightlyRiley Bruins2024-09-071-2/+4
| | | | | After Neovim pull #30193, the formatter was broken due to changes in the way node data is passed to predicates.
* fix(format): field_def inside grouping再生花2024-08-011-0/+1
|
* feat(predicates)!: rename `has-type` to `kind-eq` to align with HelixChristian Clason2024-06-021-4/+4
| | | | No point in having a different name for the same predicate.
* feat(query): adapt to upstream changesAmaan Qureshi2024-05-261-2/+2
|