summaryrefslogtreecommitdiff
path: root/cli/lsp/mod.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-05-26 06:31:54 +0200
committerGitHub <noreply@github.com>2023-05-26 04:31:54 +0000
commit7ae55e75d812edc93251357465f8d49fc2fb5d26 (patch)
tree9d9a803cec2c5fd0dc6709f43115b82515c2dc32 /cli/lsp/mod.rs
parent89026abe395c22eb2ace4ea5f948189daa1dadf1 (diff)
Revert "chore(lsp/tests): diagnostic synchronization (#19264)" (#19268)
This reverts commit 89026abe395c22eb2ace4ea5f948189daa1dadf1. This change caused LSP benchmarks to fail on `main`.
Diffstat (limited to 'cli/lsp/mod.rs')
-rw-r--r--cli/lsp/mod.rs18
1 files changed, 3 insertions, 15 deletions
diff --git a/cli/lsp/mod.rs b/cli/lsp/mod.rs
index d13c90089..0d5552519 100644
--- a/cli/lsp/mod.rs
+++ b/cli/lsp/mod.rs
@@ -8,8 +8,6 @@ use crate::lsp::language_server::LanguageServer;
pub use repl::ReplCompletionItem;
pub use repl::ReplLanguageServer;
-use self::diagnostics::should_send_diagnostic_batch_index_notifications;
-
mod analysis;
mod cache;
mod capabilities;
@@ -38,7 +36,7 @@ pub async fn start() -> Result<(), AnyError> {
let stdin = tokio::io::stdin();
let stdout = tokio::io::stdout();
- let builder = LspService::build(|client| {
+ let (service, socket) = LspService::build(|client| {
language_server::LanguageServer::new(client::Client::from_tower(client))
})
.custom_method(lsp_custom::CACHE_REQUEST, LanguageServer::cache_request)
@@ -60,18 +58,8 @@ pub async fn start() -> Result<(), AnyError> {
lsp_custom::VIRTUAL_TEXT_DOCUMENT,
LanguageServer::virtual_text_document,
)
- .custom_method(lsp_custom::INLAY_HINT, LanguageServer::inlay_hint);
-
- let builder = if should_send_diagnostic_batch_index_notifications() {
- builder.custom_method(
- lsp_custom::LATEST_DIAGNOSTIC_BATCH_INDEX,
- LanguageServer::latest_diagnostic_batch_index_request,
- )
- } else {
- builder
- };
-
- let (service, socket) = builder.finish();
+ .custom_method(lsp_custom::INLAY_HINT, LanguageServer::inlay_hint)
+ .finish();
Server::new(stdin, stdout, socket).serve(service).await;