From e5581a24ab819ee341160a7821b5d1ef0fff70ae Mon Sep 17 00:00:00 2001 From: Idobenhamo Date: Tue, 9 Apr 2024 17:19:17 +0300 Subject: [PATCH 1/3] Update the tree sitter to support Typst 0.11 and changed the lsp to Tinymist --- languages.toml | 6 +++--- runtime/queries/typst/highlights.scm | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/languages.toml b/languages.toml index b700c326524e..af75b9c30561 100644 --- a/languages.toml +++ b/languages.toml @@ -101,7 +101,7 @@ wgsl_analyzer = { command = "wgsl_analyzer" } 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"] } @@ -3071,7 +3071,7 @@ scope = "source.typst" injection-regex = "typst" file-types = ["typst", "typ"] comment-token = "//" -language-servers = ["typst-lsp"] +language-servers = ["tinymist"] indent = { tab-width = 2, unit = " " } [language.auto-pairs] @@ -3083,7 +3083,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 0bbccede0564..4e012a2fe182 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) From 0b80f165eda2993122cd2237976cfcacab03eae8 Mon Sep 17 00:00:00 2001 From: Idobenhamo Date: Tue, 9 Apr 2024 19:14:58 +0300 Subject: [PATCH 2/3] Fixed --- book/src/generated/lang-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index fb1c7bd5a473..9001c007b01d 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -196,7 +196,7 @@ | tsx | ✓ | ✓ | ✓ | `typescript-language-server` | | twig | ✓ | | | | | typescript | ✓ | ✓ | ✓ | `typescript-language-server` | -| typst | ✓ | | | `typst-lsp` | +| typst | ✓ | | | `tinymist` | | ungrammar | ✓ | | | | | unison | ✓ | | ✓ | | | uxntal | ✓ | | | | From 7b666f3190e2ad5b091fea8c11ce26c4d909236e Mon Sep 17 00:00:00 2001 From: Idobenhamo Date: Fri, 12 Apr 2024 17:17:50 +0300 Subject: [PATCH 3/3] Added typst-lsp & tinymist --- book/src/generated/lang-support.md | 2 +- languages.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 9001c007b01d..55a78e761c4a 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -196,7 +196,7 @@ | tsx | ✓ | ✓ | ✓ | `typescript-language-server` | | twig | ✓ | | | | | typescript | ✓ | ✓ | ✓ | `typescript-language-server` | -| typst | ✓ | | | `tinymist` | +| typst | ✓ | | | `tinymist`, `typst-lsp` | | ungrammar | ✓ | | | | | unison | ✓ | | ✓ | | | uxntal | ✓ | | | | diff --git a/languages.toml b/languages.toml index 907786e05fbe..502041507262 100644 --- a/languages.toml +++ b/languages.toml @@ -101,6 +101,7 @@ wgsl_analyzer = { command = "wgsl_analyzer" } 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"] } @@ -3071,7 +3072,7 @@ scope = "source.typst" injection-regex = "typst" file-types = ["typst", "typ"] comment-token = "//" -language-servers = ["tinymist"] +language-servers = ["tinymist", "typst-lsp"] indent = { tab-width = 2, unit = " " } [language.auto-pairs]