Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/rust-analyzer/src/lsp_ext.rs3
-rw-r--r--crates/rust-analyzer/src/main_loop.rs2
-rw-r--r--editors/code/src/commands.ts2
-rw-r--r--editors/code/src/lsp_ext.ts2
4 files changed, 4 insertions, 5 deletions
diff --git a/crates/rust-analyzer/src/lsp_ext.rs b/crates/rust-analyzer/src/lsp_ext.rs
index a2d539cf6c..f03b8398c1 100644
--- a/crates/rust-analyzer/src/lsp_ext.rs
+++ b/crates/rust-analyzer/src/lsp_ext.rs
@@ -132,9 +132,8 @@ pub struct ExpandedMacro {
pub enum CancelFlycheck {}
-impl Request for CancelFlycheck {
+impl Notification for CancelFlycheck {
type Params = ();
- type Result = ();
const METHOD: &'static str = "rust-analyzer/cancelFlycheck";
}
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 8d621cc36a..add999504d 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -635,7 +635,6 @@ impl GlobalState {
.on_sync_mut::<lsp_ext::ReloadWorkspace>(handlers::handle_workspace_reload)
.on_sync_mut::<lsp_ext::MemoryUsage>(handlers::handle_memory_usage)
.on_sync_mut::<lsp_ext::ShuffleCrateGraph>(handlers::handle_shuffle_crate_graph)
- .on_sync_mut::<lsp_ext::CancelFlycheck>(handlers::handle_cancel_flycheck)
.on_sync::<lsp_ext::JoinLines>(handlers::handle_join_lines)
.on_sync::<lsp_ext::OnEnter>(handlers::handle_on_enter)
.on_sync::<lsp_types::request::SelectionRangeRequest>(handlers::handle_selection_range)
@@ -822,6 +821,7 @@ impl GlobalState {
}
Ok(())
})?
+ .on::<lsp_ext::CancelFlycheck>(handlers::handle_cancel_flycheck)?
.on::<lsp_types::notification::DidChangeTextDocument>(|this, params| {
if let Ok(path) = from_proto::vfs_path(&params.text_document.uri) {
match this.mem_docs.get_mut(&path) {
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
index e0b4bb63c3..283771f270 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -788,7 +788,7 @@ export function openDocs(ctx: CtxInit): Cmd {
export function cancelFlycheck(ctx: CtxInit): Cmd {
return async () => {
- await ctx.client.sendRequest(ra.cancelFlycheck);
+ await ctx.client.sendNotification(ra.cancelFlycheck);
};
}
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
index 78da4e959c..6f63084108 100644
--- a/editors/code/src/lsp_ext.ts
+++ b/editors/code/src/lsp_ext.ts
@@ -79,7 +79,7 @@ export const relatedTests = new lc.RequestType<lc.TextDocumentPositionParams, Te
"rust-analyzer/relatedTests"
);
-export const cancelFlycheck = new lc.RequestType0<void, void>("rust-analyzer/cancelFlycheck");
+export const cancelFlycheck = new lc.NotificationType0("rust-analyzer/cancelFlycheck");
export const runFlycheck = new lc.NotificationType<{
textDocument: lc.TextDocumentIdentifier | null;