Skip to content

Commit 86a0ecd

Browse files
committed
fix taplo lsp exit behavior
tamasfe/taplo#354
1 parent c938589 commit 86a0ecd

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Example devShell following `nix-trickle`: ❄️
5858
- nixpkgs/[micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html): newer version
5959
- nixpkgs/[garage](https://garagehq.deuxfleurs.fr): newer version
6060
- nixpkgs/[ruff-lsp](https://github.com/charliermarsh/ruff-lsp): added
61+
- nixpkgs/[taplo](https://taplo.tamasfe.dev): fixed [LSP shutdown request](https://github.com/tamasfe/taplo/pull/354)
6162
- nixpkgs/google-cloud-sdk: fixed `gsutil`, [cf](https://github.com/NixOS/nixpkgs/issues/67094#issuecomment-1148856771)
6263
- nixpkgs/[cloud-sql-proxy_2](https://github.com/GoogleCloudPlatform/cloudsql-proxy): v2 of cloud-sql-proxy
6364
- nixpkgs/[pspg](https://github.com/okbob/pspg): updates querystream on file changes (--querystream -f query.sql)

overlays/nixpkgs.nix

+15-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,21 @@ in {
120120
fmt_9
121121
];
122122
});
123-
123+
# until: https://github.com/tamasfe/taplo/pull/354
124+
taplo = prev.taplo.overrideAttrs (old: let
125+
patch = prev.fetchpatch {
126+
url = "https://github.com/tamasfe/taplo/commit/f8389bfbb5e3200c52c9d5cf63d7c6fd70ba66b1.patch";
127+
sha256 = "sha256-Y/VszK4ZJVYyjW6Kl+9tfl5nf9XjXudd+D8s8sVZXks=";
128+
};
129+
vendorPath = "../${prev.taplo.pname}-${old.version}-vendor.tar.gz/";
130+
listenCSBefore = "4c1e97de6f992c27f7eb1525228a33ffb1a41789fd5b33234cbba554453f3e64";
131+
listenCSAfter = "47411be3fb1a5eb6f03ffc8807a2a16f1f1e3df54facd05f1d038beb6bf11a20";
132+
in {
133+
patches = prev.patches or [] ++ [patch];
134+
patchFlags = ["-p2" "-d" vendorPath];
135+
# brutally update checksum of patched listen.rs
136+
postPatch = "sed -i 's/${listenCSBefore}/${listenCSAfter}/g' ${vendorPath}/lsp-async-stub/.cargo-checksum.json";
137+
});
124138
# ruff-lsp from: https://github.com/kalekseev/dotfiles/blob/f79db5e662915143c617934e9097b1c8956aa7c7/nixpkgs/overlays/my-packages.nix#L38
125139
ruff-lsp = let
126140
pkgs = prev.python3.pkgs;

0 commit comments

Comments
 (0)