diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index d00d6562..a5013bbe 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -197,7 +197,7 @@ | tsx | ✓ | ✓ | ✓ | `typescript-language-server` | | twig | ✓ | | | | | typescript | ✓ | ✓ | ✓ | `typescript-language-server` | -| typst | ✓ | | | `typst-lsp` | +| typst | ✓ | | | `tinymist`, `typst-lsp` | | ungrammar | ✓ | | | | | unison | ✓ | | ✓ | | | uxntal | ✓ | | | | diff --git a/languages.toml b/languages.toml index cd638671..d543aff2 100644 --- a/languages.toml +++ b/languages.toml @@ -102,6 +102,7 @@ yaml-language-server = { command = "yaml-language-server", args = ["--stdio"] } zls = { command = "zls" } blueprint-compiler = { command = "blueprint-compiler", args = ["lsp"] } typst-lsp = { command = "typst-lsp" } +tinymist = { command = "tinymist" } pkgbuild-language-server = { command = "pkgbuild-language-server" } helm_ls = { command = "helm_ls", args = ["serve"] } ember-language-server = { command = "ember-language-server", args = ["--stdio"] } @@ -3094,7 +3095,7 @@ scope = "source.typst" injection-regex = "typst" file-types = ["typst", "typ"] comment-token = "//" -language-servers = ["typst-lsp"] +language-servers = ["tinymist", "typst-lsp"] indent = { tab-width = 2, unit = " " } [language.auto-pairs] @@ -3106,7 +3107,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "typst" -source = { git = "https://github.com/uben0/tree-sitter-typst", rev = "ecf8596336857adfcd5f7cbb3b2aa11a67badc37" } +source = { git = "https://github.com/uben0/tree-sitter-typst", rev = "13863ddcbaa7b68ee6221cea2e3143415e64aea4" } [[language]] name = "nunjucks" diff --git a/runtime/queries/typst/highlights.scm b/runtime/queries/typst/highlights.scm index 0bbccede..4e012a2f 100644 --- a/runtime/queries/typst/highlights.scm +++ b/runtime/queries/typst/highlights.scm @@ -21,6 +21,7 @@ ; OPERATOR (in ["in" "not"] @keyword.operator) +(context "context" @keyword.control) (and "and" @keyword.operator) (or "or" @keyword.operator) (not "not" @keyword.operator) @@ -45,12 +46,9 @@ (string) @string (content ["[" "]"] @operator) (bool) @constant.builtin.boolean -(builtin) @constant.builtin (none) @constant.builtin (auto) @constant.builtin (ident) @variable -(call - item: (builtin) @function.builtin) ; MARKUP (item "-" @markup.list)