Skip to content

Commit 892bb9d

Browse files
gabyddarchseer
authored andcommitted
Update typescript grammar and queries (helix-editor#4703)
* fix(grammars): update treesitter grammar and queries * add override keyword * Update runtime/queries/typescript/highlights.scm Co-authored-by: Blaž Hrastnik <[email protected]>
1 parent 95174aa commit 892bb9d

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

languages.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ indent = { tab-width = 2, unit = " " }
399399

400400
[[grammar]]
401401
name = "typescript"
402-
source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "3e897ea5925f037cfae2e551f8e6b12eec2a201a", subpath = "typescript" }
402+
source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "6aac031ad88dd6317f02ac0bb27d099a553a7d8c", subpath = "typescript" }
403403

404404
[[language]]
405405
name = "tsx"
@@ -413,7 +413,7 @@ indent = { tab-width = 2, unit = " " }
413413

414414
[[grammar]]
415415
name = "tsx"
416-
source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "3e897ea5925f037cfae2e551f8e6b12eec2a201a", subpath = "tsx" }
416+
source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "6aac031ad88dd6317f02ac0bb27d099a553a7d8c", subpath = "tsx" }
417417

418418
[[language]]
419419
name = "css"

runtime/queries/typescript/highlights.scm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"implements"
3535
"keyof"
3636
"namespace"
37+
"override"
3738
] @keyword
3839

3940
[
@@ -62,3 +63,15 @@
6263

6364
((identifier) @type
6465
(#match? @type "^[A-Z]"))
66+
67+
; Literals
68+
69+
[
70+
(template_literal_type)
71+
] @string
72+
73+
; Tokens
74+
75+
(template_type
76+
"${" @punctuation.special
77+
"}" @punctuation.special) @embedded

0 commit comments

Comments
 (0)