Skip to content

Commit

Permalink
Support Typst 0.11 (helix-editor#10321)
Browse files Browse the repository at this point in the history
* Update the tree sitter to support Typst 0.11 and changed the lsp to Tinymist

* Fixed

* Added typst-lsp & tinymist

---------

Co-authored-by: Idobenhamo <idobenhamo@users.noreply.github.com>
  • Loading branch information
2 people authored and shaleh committed Apr 16, 2024
1 parent 13d5db8 commit 8b34358
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
| tsx |||| `typescript-language-server` |
| twig || | | |
| typescript |||| `typescript-language-server` |
| typst || | | `typst-lsp` |
| typst || | | `tinymist`, `typst-lsp` |
| ungrammar || | | |
| unison || || |
| uxntal || | | |
Expand Down
5 changes: 3 additions & 2 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down Expand Up @@ -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]
Expand All @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions runtime/queries/typst/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 8b34358

Please sign in to comment.