From 03d39197da29d97527a4e21d29bfea42f4d5e7d7 Mon Sep 17 00:00:00 2001 From: icp Date: Sun, 2 Apr 2023 22:20:07 +0530 Subject: [PATCH] taplo: Handle LSP shutdown request --- .../0001-handle-lsp-shutdown-request.patch | 26 +++++++++++++++++++ srcpkgs/taplo/template | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/taplo/patches/0001-handle-lsp-shutdown-request.patch diff --git a/srcpkgs/taplo/patches/0001-handle-lsp-shutdown-request.patch b/srcpkgs/taplo/patches/0001-handle-lsp-shutdown-request.patch new file mode 100644 index 00000000000..9abf3fd25ea --- /dev/null +++ b/srcpkgs/taplo/patches/0001-handle-lsp-shutdown-request.patch @@ -0,0 +1,26 @@ +From https://github.com/tamasfe/taplo/pull/354 +From: Michael Davis +Date: Sun, 20 Nov 2022 12:25:43 -0600 +Subject: [PATCH] Handle LSP shutdown request + +These lines in the Server loop discard any messages with the shutdown +method. The Server can handle and correctly respond to shutdown +requests, though, so there's no need to discard the message. +--- + crates/lsp-async-stub/src/listen.rs | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/crates/lsp-async-stub/src/listen.rs b/crates/lsp-async-stub/src/listen.rs +index fca0a2980..b6b00f5fd 100644 +--- a/crates/lsp-async-stub/src/listen.rs ++++ b/crates/lsp-async-stub/src/listen.rs +@@ -64,8 +64,6 @@ impl Server { + drop(output); + drop(input); + break; +- } else if msg.method.as_ref().map(|m| m == "shutdown").unwrap_or(false) { +- continue; + } + + let task_fut = self.handle_message( + diff --git a/srcpkgs/taplo/template b/srcpkgs/taplo/template index af4f095d460..84e86a6c4c3 100644 --- a/srcpkgs/taplo/template +++ b/srcpkgs/taplo/template @@ -1,7 +1,7 @@ # Template file for 'taplo' pkgname=taplo version=0.8.0 -revision=1 +revision=2 build_wrksrc="crates/taplo-cli" build_style=cargo # no-default-features: allows selecting custom feature set