From b2f2621c1717df3141ae292c303896fb427fd2f7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 20 Dec 2018 12:20:28 +0300 Subject: Use ContentModified error code https://github.com/Microsoft/language-server-protocol/commit/25679c2e4b26cb18af8c943319d40d4f3561a340 --- crates/gen_lsp_server/src/msg.rs | 1 + crates/ra_lsp_server/src/main_loop.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/gen_lsp_server/src/msg.rs b/crates/gen_lsp_server/src/msg.rs index 1e5384380..22d273d55 100644 --- a/crates/gen_lsp_server/src/msg.rs +++ b/crates/gen_lsp_server/src/msg.rs @@ -55,6 +55,7 @@ pub enum ErrorCode { ServerNotInitialized = -32002, UnknownErrorCode = -32001, RequestCancelled = -32800, + ContentModified = -32801, } #[derive(Debug, Serialize, Deserialize, Clone)] diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index eab82ee85..16a52c6d6 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs @@ -417,7 +417,7 @@ impl<'a> PoolDispatcher<'a> { if is_canceled(&e) { RawResponse::err( id, - ErrorCode::RequestCancelled as i32, + ErrorCode::ContentModified as i32, e.to_string(), ) } else { -- cgit v1.2.3