Skip to content

Commit

Permalink
Update Typescript, TSX and Svelte grammar, to latest tag (#6874)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Davis <[email protected]>
  • Loading branch information
jeppech and the-mikedavis authored Jul 14, 2023
1 parent 843ae97 commit bc4f08f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ indent = { tab-width = 2, unit = " " }

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

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

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

[[language]]
name = "css"
Expand Down Expand Up @@ -912,7 +912,7 @@ language-servers = [ "svelteserver" ]

[[grammar]]
name = "svelte"
source = { git = "https://github.com/Himujjal/tree-sitter-svelte", rev = "349a5984513b4a4a9e143a6e746120c6ff6cf6ed" }
source = { git = "https://github.com/Himujjal/tree-sitter-svelte", rev = "be7f2e7db1fc19f0852265ec60923fc058380739" }

[[language]]
name = "vue"
Expand Down
1 change: 1 addition & 0 deletions runtime/queries/_typescript/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"keyof"
"namespace"
"override"
"satisfies"
] @keyword

[
Expand Down
10 changes: 10 additions & 0 deletions runtime/queries/svelte/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
(raw_text) @injection.content)
(#set! injection.language "css"))

((style_element
(start_tag
(attribute
(attribute_name) @_attr
(quoted_attribute_value (attribute_value) @_lang)))
(raw_text) @injection.content)
(#eq? @_attr "lang")
(#match? @_lang "scss")
(#set! injection.language "scss"))

((attribute
(attribute_name) @_attr
(quoted_attribute_value (attribute_value) @css))
Expand Down

0 comments on commit bc4f08f

Please sign in to comment.