| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Problem: Gitlab has too frequent outages, which break automation.
Solution: Drop all Gitlab-hosted parsers (two of which have been
unmaintained for years).
|
| |
|
|
|
|
| |
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)
|
| | |
|
| |
|
|
| |
Make clear this is not the default branch
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
* 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).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Many export keywords are captured as `@keyword.import`. This commit
makes it so they are all captured like that, and mentions it in the
documentation.
|
| | |
|
| |
|
|
| |
`@keyword` is only for language-defined keywords.
|
| |
|
|
|
|
|
|
| |
* blueprint: Don't specially highlight template_name_qualifier. This is
similar to inheritance base class. Other languages don't highlight
them specially.
* eds: `@type` for all `*Type` keys
* chatito: `@attribute` for variation
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Allowing undocumented "secret" (sub)captures makes it harder
to write comprehensive colorschemes and catch inconsistent captures.
Solution: Only allow captures listed in CONTRIBUTING.md. Add useful
(cross-language) subcaptures and drop language-specific or too niche
ones.
Follow-up: Adding further `*.builtin` captures and changing queries to
use them.
Language-specific subcaptures should instead be added in user config or
a custom language plugin.
|
| | |
|
| |
|
|
|
| |
Distinguishing `hint` and `info` is too confusing; it's enough to have
`error`, `warning`, `todo`, and `note`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
|
| | |
|
| |
|
| |
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
|
| |
|
|
|
|
|
|
|
| |
Since 0.9, @lang syntax is still available as fallback but will soon be deprecated.
Because of that, new syntax should be adopted once 0.9 becomes the
baseline requirements for nvim-treesitter
- update health check
- update doc
|
| |
|
|
|
|
| |
- Document that only certain kinds of strings are spell checked, and
reasons why they may not.
- Remove spell checking for bash strings.
|
| | |
|
| |
|
|
|
| |
This just adds a small note in the CONTRIBUTING section about local
queries and how they differ from those listed upstream.
|
| |
|
|
|
|
|
|
| |
update CONTRIBUTING.md
adjust indents for bass
fix doc capture comment
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Fixed link of the supported languages.
|
| | |
|
| | |
|
| |
|
| |
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
This is just a tiny change that was in reference to
https://github.com/nvim-treesitter/nvim-treesitter/pull/4153#discussion_r1070276800.
The basis is that `@storageclass` should only be used unless it's
actually affecting storage in memory. There are further conversations
about this in the following places:
- https://github.com/nvim-treesitter/nvim-treesitter/pull/3648#issuecomment-1279923861
- https://github.com/nvim-treesitter/nvim-treesitter/pull/3648#issuecomment-1291624844
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
After https://github.com/nvim-treesitter/nvim-treesitter/issues/470,
we decided to use `@conditional` for ternary operator instead of
operator despite `@conditional` is documented for keywords only.
A sub-scoping can make it easier for people to highlight this operator
group differently.
Also unify the usage of `@conditional...` across languages.
|
| | |
|
| |
|
| |
supported as of Neovim v0.8.1
|
| | |
|