Maksim Terpilovskii
|
523a9e1489
|
fix(svelte): else if highlight (#7797)
|
2025-04-04 14:08:02 +02:00 |
|
Jaehwang Jung
|
998b230a77
|
feat(highlights)!: keyword @type.qualifier → @keyword.modifier
|
2024-03-16 20:51:16 +08:00 |
|
Phạm Huy Hoàng
|
62b0bb4f24
|
feat(format): extra newline after modeline
|
2024-02-29 23:05:30 +09:00 |
|
Amaan Qureshi
|
3a7b5a9fb4
|
feat(svelte)!: switch upstream parser
|
2024-02-19 08:11:17 -05: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 |
|
Amaan Qureshi
|
85330918f0
|
perf: remove match where possible
|
2023-04-21 18:24:17 -04:00 |
|
Amaan Qureshi
|
3c42fb9d70
|
refactor(svelte): match certain keywords for conditional and exception
|
2023-03-03 07:07:52 -08:00 |
|
Amaan Qureshi
|
33ba346e60
|
feat!: add @keyword.coroutine capture
|
2023-03-03 07:07:52 -08:00 |
|
elianiva
|
5d2faa0466
|
refactor: make html-like languages inherit from single query
|
2021-05-17 23:38:14 +02:00 |
|
Stephan Seitz
|
9ebe0bd8d7
|
Fix svelte highlights
|
2021-04-21 19:15:54 +02:00 |
|
elianiva
|
1bbcd2fbc2
|
svelte: also capture src as text.uri
|
2021-02-28 14:01:54 -05:00 |
|
elianiva
|
25bb379a05
|
fix: missing erroneous end tag
|
2021-02-23 16:27:16 +01:00 |
|
elianiva
|
72d38fc44b
|
refactor: use eq
|
2021-02-23 16:27:16 +01:00 |
|
elianiva
|
17a74e2055
|
feat: improved highlight + injections, cc @stsewd
|
2021-02-23 16:27:16 +01:00 |
|
elianiva
|
a73e200abf
|
feat: add support for svelte
|
2021-02-23 16:27:16 +01:00 |
|