Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
svelte: Adjust block keyword highlighting (#19418)
Marshall Bowers5508832ba642
diff --git a/extensions/svelte/languages/svelte/highlights.scm b/extensions/svelte/languages/svelte/highlights.scmindex 01d8bb8db65..cd3a08921ee 100755--- a/extensions/svelte/languages/svelte/highlights.scm+++ b/extensions/svelte/languages/svelte/highlights.scm@@ -20,6 +20,7 @@))+; Style self-closing component attributes as @tag.property(self_closing_tag((tag_name) @_tag_name@@ -77,19 +78,19 @@; Treating (if, each, ...) as a keyword inside of blocks; like {#if ...} or {#each ...}(block_start_tag- tag: _ @tag.keyword+ tag: _ @keyword)(block_tag- tag: _ @tag.keyword+ tag: _ @keyword)(block_end_tag- tag: _ @tag.keyword+ tag: _ @keyword)(expression_tag- tag: _ @tag.keyword+ tag: _ @keyword); Style quoted string attribute valuesdiff --git a/extensions/svelte/languages/svelte/injections.scm b/extensions/svelte/languages/svelte/injections.scmindex 73d2b9abb1b..c3b7f088d6e 100755--- a/extensions/svelte/languages/svelte/injections.scm+++ b/extensions/svelte/languages/svelte/injections.scm@@ -55,7 +55,7 @@(#set! "language" "ts"))-; Match style tags with a lang attribute+; Match <style lang="language"> as the specified language(style_element(start_tag(attribute@@ -69,7 +69,7 @@(raw_text) @content)-; Match style tags without a lang attribute+; Match <style> tags without a lang attribute as CSS(style_element(start_tag(attribute@@ -81,6 +81,4 @@(#set! language "css"))--; Downstream TODO: Style highlighting for `style:background="red"` and `style="background: red"` strings-; Downstream TODO: Style component comments as markdown+; Downstream TODO: Style @component comments as markdown