| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
**Problem:** Rust's regex injections were not applied since the string
content is behind a `(string_content)` node, and the injections were
applied to the parent node without the `include-children` directive.
**Solution:** Apply the injections to the string content. Also highlight
them accordingly.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also consolidates most of the captures
|
| |
|
|
| |
`@keyword` is only for language-defined keywords.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* ref(rust): highlight debug macros as `@debug`
E.g. `dbg!` and `debug_assert!`
* Update queries/rust/highlights.scm
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
---------
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/3992
|
| | |
|
| | |
|
| |
|
|
| |
for_lifetimes
|
| | |
|
| |
|
|
| |
@namespace
|
| | |
|
| |
|
|
|
|
|
| |
* `if_let_expression` was removed in https://github.com/tree-sitter/tree-sitter-rust/pull/152
* `attributes` were reworked in
https://github.com/tree-sitter/tree-sitter-rust/pull/163 (no more
`meta-item`)
|
| |
|
|
| |
Fixes #3641
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- sort keywords
- highlight super as a namespace (same as crate)
- highlight `break` and `continue` as `repeat` keywords
- don't highlight `macro_rules!` as a keyword
- place all literal queries together
- place function definition queries alongside function call queries
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- sort operators
- remove duplicated `*`
- add missing `<<=`
- highlight `as` correctly in path aliasing
- highlight leading quote `'` as part of a label (not an operator)
- highlight never type `!` as a type
- sort and format punctuation
|
| |
|
|
| |
as string.find is much quicker than vim.regex:match*
|
| |
|
|
|
|
|
| |
* Rust: highlight uppercase identifiers in match arms as constant
Closes https://github.com/nvim-treesitter/nvim-treesitter/issues/1928
* Highlight builtins
|