From 299bcce481abe7e13f2023ec6e82c59b43f12f47 Mon Sep 17 00:00:00 2001 From: Idobenhamo <135357971+Idobenhamo@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:27:46 +0200 Subject: [PATCH] Update Typst Tree-Sitter grammar (#9403) Co-authored-by: Idobenhamo --- languages.toml | 2 +- runtime/queries/typst/highlights.scm | 7 ++++++- runtime/queries/typst/injections.scm | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/languages.toml b/languages.toml index 4ff529c4..83c77047 100644 --- a/languages.toml +++ b/languages.toml @@ -2865,7 +2865,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "typst" -source = { git = "https://github.com/uben0/tree-sitter-typst", rev = "e35aa22395fdde82bbc4b5700c324ce346dfc9e5" } +source = { git = "https://github.com/uben0/tree-sitter-typst", rev = "ecf8596336857adfcd5f7cbb3b2aa11a67badc37" } [[language]] name = "nunjucks" diff --git a/runtime/queries/typst/highlights.scm b/runtime/queries/typst/highlights.scm index b422e05b..0bbccede 100644 --- a/runtime/queries/typst/highlights.scm +++ b/runtime/queries/typst/highlights.scm @@ -55,7 +55,12 @@ ; MARKUP (item "-" @markup.list) (term ["/" ":"] @markup.list) -(heading ["=" "==" "===" "====" "====="] @markup.heading.marker) @markup.heading +(heading "=" @markup.heading.marker) @markup.heading.1 +(heading "==" @markup.heading.marker) @markup.heading.2 +(heading "===" @markup.heading.marker) @markup.heading.3 +(heading "====" @markup.heading.marker) @markup.heading.4 +(heading "=====" @markup.heading.marker) @markup.heading.5 +(heading "======" @markup.heading.marker) @markup.heading.6 (url) @tag (emph) @markup.italic (strong) @markup.bold diff --git a/runtime/queries/typst/injections.scm b/runtime/queries/typst/injections.scm index 8039b4ca..06a25097 100644 --- a/runtime/queries/typst/injections.scm +++ b/runtime/queries/typst/injections.scm @@ -3,4 +3,5 @@ (raw_blck lang: (ident) @injection.language - (blob) @injection.content) \ No newline at end of file + (blob) @injection.content) +