| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
| |
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
|
| | |
|
| |
|
|
| |
This commit introduce diff parser.
|
| | |
|
| |
|
| |
Add `@variable.globle` to available variable captures.
|
| | |
|
| | |
|
| |
|
|
|
| |
Some builtin highlight groups (see `:h group-name`) do not yet have
associated capture groups, so add them.
|
| | |
|
| |
|
|
| |
Fixes #645
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
As suggested here:
https://github.com/nvim-treesitter/nvim-treesitter/pull/2288#issuecomment-1015163267
|
| |
|
|
|
| |
- Mention Zulip instead of Gitter
- Use query filetype instead of scheme
|
| |
|
|
|
| |
- Don't use the old form for predicates
- Update some invalid queries
|