mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Make cancelFlycheck request a notification
This commit is contained in:
parent
cdfe98fe94
commit
d8ddde27f9
4 changed files with 4 additions and 5 deletions
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
@ -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(¶ms.text_document.uri) {
|
||||
match this.mem_docs.get_mut(&path) {
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue