Christian Clason
|
692b051b09
|
feat!: drop modules, general refactor and cleanup
|
2025-05-12 18:43:40 +02:00 |
|
Riley Bruins
|
eab2005cb5
|
fix(regex): more accurate highlights for named backreferences
Highlight both surrounding angle brackets, and only apply the operator
highlight to the actual \k operator.
|
2024-11-07 22:06:35 +01:00 |
|
Riley Bruins
|
98b46a647e
|
feat(regex): highlights for lazy quantifiers, \k
Highlights the "?" following .* and the \k backreference operator in a
pattern like the following: title=(?<quote>["'])(.*?)\k<quote>
|
2024-11-03 11:35:27 +01:00 |
|
Riley Bruins
|
049d42a31e
|
feat(regex): better count quantifier highlights
|
2024-10-15 08:32:44 +02:00 |
|
Pham Huy Hoang
|
57a8acf0c4
|
chore: query formatting
|
2024-01-19 16:58:37 +01:00 |
|
Christian Clason
|
1ae9b0e455
|
feat!: align standard captures with upstream
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"
(3f44b89685/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`
|
2024-01-19 16:58:37 +01:00 |
|
Riley Bruins
|
1c619f5f20
|
feat(luap): highlights more consistent with regex (#5819)
|
2023-12-23 11:40:10 +02:00 |
|
Riley Bruins
|
7da3cb6323
|
feat(regex): any_character, start end assertion hl differentiation
|
2023-11-21 07:13:51 -05:00 |
|
Amaan Qureshi
|
08aabb145f
|
chore: update Regex from upstream
|
2023-07-12 15:51:15 +02:00 |
|
Stephan Seitz
|
43381c1321
|
Regex highlights: Add constant highlight for class_character
|
2021-01-03 19:05:38 +01:00 |
|
Stephan Seitz
|
e8fa1c2c84
|
Regex highlights: no escape highlighting for escaped special characters
|
2021-01-03 19:05:38 +01:00 |
|
Stephan Seitz
|
91220e5f4b
|
Regex highlighting: add "?" operator
|
2021-01-03 19:05:38 +01:00 |
|
Thomas Vigouroux
|
b90e520ccd
|
ci: fix wrong queries
|
2020-09-11 12:02:35 +02:00 |
|
Stephan Seitz
|
45ea0df21a
|
Add tree-sitter-regex
This might be interesting for injected highlighting
|
2020-06-14 13:09:38 +02:00 |
|