| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
* 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)
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Problem: People complain about noisy `install()`.
Solution: Gate operation summary behind `summary` install option
(default false, set to true for interactive `:TS*` commands).
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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).
|
| | |
|
| | |
|
| |
|
|
| |
Provides significantly simpler blocking installation and update.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
| |
`main` branch and `parsers.lua` is the record of truth now
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Problem: Some very long patterns were not formatted correctly.
Solution: Increase the match limit when iterating to 1024.
|
| |
|
|
|
|
|
| |
Problem: cannot run `:TSUpdate synchronously`
Solution: pass callback used after exiting jobs
(like in `install-parsers`).
|
| |
|
|
|
|
|
| |
* stable: updates follow semver releases (todo)
* unstable: updates follow HEAD (default)
* unmaintained: no automatic updates
* unsupported: no updates, cannot be installed
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
| |
No need for assert as the use is contained within the script only
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Replace sync variants with callback support
|
| | |
|
| |
|
|
| |
Co-authored-by: TheLeoP <eugenio2305@hotmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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))
```
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
Old name can be removed after 0.10.4 release
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
After Neovim pull #30193, the formatter was broken due to changes in the
way node data is passed to predicates.
|
| | |
|
| |
|
|
| |
No point in having a different name for the same predicate.
|
| | |
|