taplo: Handle LSP shutdown request

This commit is contained in:
icp 2023-04-02 22:20:07 +05:30 committed by classabbyamp
parent b39f3fd3a6
commit 03d39197da
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From https://github.com/tamasfe/taplo/pull/354
From: Michael Davis <mcarsondavis@gmail.com>
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<W: Clone + 'static> Server<W> {
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(

View File

@ -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