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 <blaz@mxxn.io>
  • Loading branch information
gabydd and archseer authored Nov 11, 2022
1 parent bb5a122 commit 7367abd
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 7367abd

Please sign in to comment.