From c2740b15f8c35b9b1e07768bf3292aa716fc8c77 Mon Sep 17 00:00:00 2001 From: Idobenhamo Date: Mon, 13 Jan 2025 11:36:01 +0200 Subject: [PATCH] Update the tree sitter to support Typst 0.12 --- languages.toml | 2 +- runtime/queries/typst/injections.scm | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/languages.toml b/languages.toml index a83a6f0d0..3487f5c17 100644 --- a/languages.toml +++ b/languages.toml @@ -3298,7 +3298,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "typst" -source = { git = "https://github.com/uben0/tree-sitter-typst", rev = "13863ddcbaa7b68ee6221cea2e3143415e64aea4" } +source = { git = "https://github.com/uben0/tree-sitter-typst", rev = "26dfb4b94a99cc9d6044342b7ad0ba761da77d60" } [[language]] name = "nunjucks" diff --git a/runtime/queries/typst/injections.scm b/runtime/queries/typst/injections.scm index fb4fee5b2..6a168827f 100644 --- a/runtime/queries/typst/injections.scm +++ b/runtime/queries/typst/injections.scm @@ -2,9 +2,6 @@ (blob) @injection.shebang @injection.content) (raw_blck - lang: (ident) @injection.language - (blob) @injection.content) - -((comment) - @injection.content - (#set! injection.language "comment")) + lang: (ident) @_lang + (blob) @injection.content + (#set-lang-from-info-string! @_lang))