Skip to content

Commit 28bcf13

Browse files
committed
Merge branch 'feat/add-typst' of github.com:AlexanderBrevig/helix
2 parents 2ace603 + ba5c14b commit 28bcf13

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

book/src/generated/lang-support.md

+1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
| tsx |||| `typescript-language-server` |
155155
| twig || | | |
156156
| typescript |||| `typescript-language-server` |
157+
| typst || | | `typst-lsp` |
157158
| ungrammar || | | |
158159
| uxntal || | | |
159160
| v |||| `v` |

languages.toml

+15
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ wgsl_analyzer = { command = "wgsl_analyzer" }
7979
yaml-language-server = { command = "yaml-language-server", args = ["--stdio"] }
8080
zls = { command = "zls" }
8181
blueprint-compiler = { command = "blueprint-compiler", args = ["lsp"] }
82+
typst-lsp = { command = "typst-lsp" }
8283

8384

8485
[language-server.lua-language-server]
@@ -2698,3 +2699,17 @@ file-types = ["webc"]
26982699
roots = []
26992700
indent = { tab-width = 2, unit = " " }
27002701
grammar = "html"
2702+
2703+
[[language]]
2704+
name = "typst"
2705+
scope = "source.typst"
2706+
injection-regex = "typst"
2707+
file-types = ["typst", "typ"]
2708+
roots = []
2709+
comment-token = "//"
2710+
language-servers = ["typst-lsp"]
2711+
indent = { tab-width = 4, unit = " " }
2712+
2713+
[[grammar]]
2714+
name = "typst"
2715+
source = { git = "https://github.com/SeniorMars/tree-sitter-typst", rev = "2e66ef4b798a26f0b82144143711f3f7a9e8ea35" }

runtime/queries/typst/highlights.scm

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
([(show_expression) (set_expression)] @constant)
2+
([(line_comment) (block_comment)] @comment)
3+
((identifier) @function)
4+
((string_literal) @string)
5+
((asssigned_argument) @type)
6+
(["#"] @punctuation)
7+
(["+"] @operator)
8+
(["(" ")" "{" "}" "[" "]"] @punctuation.bracket)
9+
(["="] @markup.heading)

0 commit comments

Comments
 (0)