From bc4f08febf87c4d498971153715e30a39c61d511 Mon Sep 17 00:00:00 2001 From: Jeppe Christiansen Date: Fri, 14 Jul 2023 04:42:07 +0200 Subject: [PATCH] Update Typescript, TSX and Svelte grammar, to latest tag (#6874) Co-authored-by: Michael Davis --- languages.toml | 6 +++--- runtime/queries/_typescript/highlights.scm | 1 + runtime/queries/svelte/injections.scm | 10 ++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/languages.toml b/languages.toml index 418250b46..c1315d96e 100644 --- a/languages.toml +++ b/languages.toml @@ -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" @@ -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" @@ -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" diff --git a/runtime/queries/_typescript/highlights.scm b/runtime/queries/_typescript/highlights.scm index 02f3aab77..a83b43475 100644 --- a/runtime/queries/_typescript/highlights.scm +++ b/runtime/queries/_typescript/highlights.scm @@ -88,6 +88,7 @@ "keyof" "namespace" "override" + "satisfies" ] @keyword [ diff --git a/runtime/queries/svelte/injections.scm b/runtime/queries/svelte/injections.scm index 04e860cf0..65a6e0e41 100644 --- a/runtime/queries/svelte/injections.scm +++ b/runtime/queries/svelte/injections.scm @@ -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))