feat: add typst file type

This commit is contained in:
CJ van den Berg 2024-08-30 20:58:57 +02:00
parent 8c1f1b806b
commit e79f10d59f
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 12 additions and 0 deletions

View file

@ -60,6 +60,7 @@ pub fn build(b: *std.Build) void {
ts_queryfile(b, tree_sitter_dep, "tree-sitter-superhtml/tree-sitter-superhtml/queries/highlights.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-toml/queries/highlights.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-typescript/queries/highlights.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-typst/queries/typst/highlights.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-xml/queries/dtd/highlights.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-xml/queries/xml/highlights.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-yaml/queries/highlights.scm"),
@ -84,6 +85,7 @@ pub fn build(b: *std.Build) void {
ts_queryfile(b, tree_sitter_dep, "tree-sitter-purescript/vim_queries/injections.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-rust/queries/injections.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-superhtml/tree-sitter-superhtml/queries/injections.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-typst/queries/typst/injections.scm"),
ts_queryfile(b, tree_sitter_dep, "tree-sitter-zig/queries/injections.scm"),
} else &.{
.{ .name = "build_options", .module = options_mod },

View file

@ -337,6 +337,16 @@ pub const typescript = .{
.language_server = .{ "deno", "lsp" },
};
pub const typst = .{
.color = 0x007acc,
.icon = "t",
.extensions = .{ "typst", "typ" },
.comment = "//",
.language_server = .{"tinymist"},
.highlights = "tree-sitter-typst/queries/typst/highlights.scm",
.injections = "tree-sitter-typst/queries/typst/injections.scm",
};
pub const xml = .{
.icon = "󰗀",
.extensions = .{"xml"},