diff --git a/config.nix b/config.nix index 9de0810..4b190c9 100644 --- a/config.nix +++ b/config.nix @@ -197,6 +197,17 @@ args = ["fmt"]; }; } + { + name = "typst"; + auto-format = true; + scope = "source.typst"; + injection-regex = "typst"; + file-types = ["typ"]; + roots = []; + comment-token = "//"; + language-server.command = "${typst-lsp}/bin/typst-lsp"; + formatter.command = "${typst-fmt}/bin/typstfmt"; + } ]; }; themes = { @@ -225,5 +236,12 @@ sha256 = "sha256-AGZm2D8rW08gMyZ8dSZyAgqgyl/lKiZxBOFDPX0LY4I="; queries = "queries/templ"; } + { + name = "typst"; + url = "https://github.com/uben0/tree-sitter-typst"; + rev = "791cac478226e3e78809b67ff856010bde709594"; + sha256 = "sha256-YI+EyLKvw1qg122aH1UCggTQtDT8TioSau6GGRwWktc="; + queries = "queries"; + } ]; } diff --git a/flake.nix b/flake.nix index 84723eb..ffc8a65 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,7 @@ version = grammar.rev; buildInputs = [pkgs.helix pkgs.git]; src = source; + dontInstall = true; buildPhase = '' runHook preBuild