Skip to content

Commit

Permalink
Update typescript grammar and queries (helix-editor#4703)
Browse files Browse the repository at this point in the history
* fix(grammars): update treesitter grammar and queries

* add override keyword

* Update runtime/queries/typescript/highlights.scm

Co-authored-by: Blaž Hrastnik <[email protected]>
  • Loading branch information
2 people authored and Frederik Vestre committed Feb 6, 2023
1 parent 95174aa commit 892bb9d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ indent = { tab-width = 2, unit = " " }

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

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

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

[[language]]
name = "css"
Expand Down
13 changes: 13 additions & 0 deletions runtime/queries/typescript/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"implements"
"keyof"
"namespace"
"override"
] @keyword

[
Expand Down Expand Up @@ -62,3 +63,15 @@

((identifier) @type
(#match? @type "^[A-Z]"))

; Literals

[
(template_literal_type)
] @string

; Tokens

(template_type
"${" @punctuation.special
"}" @punctuation.special) @embedded

0 comments on commit 892bb9d

Please sign in to comment.