Merge pull request #237851 from figsoda/typst-lsp

This commit is contained in:
figsoda 2023-06-17 17:12:41 -04:00 committed by GitHub
commit 4da75c1fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 552 additions and 162 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,13 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "typst-lsp"; pname = "typst-lsp";
version = "0.5.1"; version = "0.6.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nvarner"; owner = "nvarner";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-UY7HfUNssOgEuBBPpUFJZs1TM4IT0/kRcjqrXPFoShI="; hash = "sha256-RYFIJYgyBe0WhNEP1cDI7JvM4Ka+39uyOx5pcpWhq3I=";
}; };
cargoLock = { cargoLock = {
@ -19,11 +19,17 @@ rustPlatform.buildRustPackage rec {
outputHashes = { outputHashes = {
"elsa-1.8.1" = "sha256-/85IriplPxx24TE/CsvjIsve100QUZiVqS0TWgPFRbw="; "elsa-1.8.1" = "sha256-/85IriplPxx24TE/CsvjIsve100QUZiVqS0TWgPFRbw=";
"svg2pdf-0.4.1" = "sha256-WeVP+yhqizpTdRfyoj2AUxFKhGvVJIIiRV0GTXkgLtQ="; "svg2pdf-0.4.1" = "sha256-WeVP+yhqizpTdRfyoj2AUxFKhGvVJIIiRV0GTXkgLtQ=";
"typst-0.4.0" = "sha256-S8J2D87Zvyh501d8LG69in9om/nTS6Y+IDhJvjm/H0w="; "typst-0.5.0" = "sha256-obUe9OVQ8M7MORudQGN7zaYjUv4zjeh7XidHHmUibTA=";
}; };
}; };
cargoHash = "sha256-ISkw0lhUKJG8nWUHcR93sLUFt5dDEyK7EORcOXEmVbE="; patches = [
# typst-library tries to access the workspace with include_bytes, which
# fails when it is vendored as its own separate crate
# this patch moves the required assets into the crate and fixes the issue
# see https://github.com/typst/typst/pull/1515
./move-typst-assets.patch
];
meta = with lib; { meta = with lib; {
description = "A brand-new language server for Typst"; description = "A brand-new language server for Typst";

View File

@ -0,0 +1,40 @@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1873,7 +1873,7 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
[[package]]
name = "typst"
version = "0.5.0"
-source = "git+https://github.com/typst/typst.git?tag=v0.5.0#3a8b9cce471934031ba57c5972d194ac1d7d2a6c"
+source = "git+https://github.com/typst/typst.git?rev=30bb33aafced4f1bf4a00803550f0e1e42672ded#30bb33aafced4f1bf4a00803550f0e1e42672ded"
dependencies = [
"bitflags 2.3.1",
"bytemuck",
@@ -1915,7 +1915,7 @@ dependencies = [
[[package]]
name = "typst-library"
version = "0.5.0"
-source = "git+https://github.com/typst/typst.git?tag=v0.5.0#3a8b9cce471934031ba57c5972d194ac1d7d2a6c"
+source = "git+https://github.com/typst/typst.git?rev=30bb33aafced4f1bf4a00803550f0e1e42672ded#30bb33aafced4f1bf4a00803550f0e1e42672ded"
dependencies = [
"az",
"chinese-number",
@@ -1983,7 +1983,7 @@ dependencies = [
[[package]]
name = "typst-macros"
version = "0.5.0"
-source = "git+https://github.com/typst/typst.git?tag=v0.5.0#3a8b9cce471934031ba57c5972d194ac1d7d2a6c"
+source = "git+https://github.com/typst/typst.git?rev=30bb33aafced4f1bf4a00803550f0e1e42672ded#30bb33aafced4f1bf4a00803550f0e1e42672ded"
dependencies = [
"heck",
"proc-macro2",
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -32,6 +32,6 @@ tokio = { version = "1.26.0", features = [
"io-std",
] }
tower-lsp = "0.19.0"
-typst = { git = "https://github.com/typst/typst.git", tag = "v0.5.0" }
-typst-library = { git = "https://github.com/typst/typst.git", tag = "v0.5.0" }
+typst = { git = "https://github.com/typst/typst.git", rev = "30bb33aafced4f1bf4a00803550f0e1e42672ded" }
+typst-library = { git = "https://github.com/typst/typst.git", rev = "30bb33aafced4f1bf4a00803550f0e1e42672ded" }
walkdir = "2.3"