diff --git a/crates/gen_lsp_server/src/msg.rs b/crates/gen_lsp_server/src/msg.rs index 1e5384380f..22d273d55a 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 d2f16ea975..1d6e3e5d60 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs @@ -386,7 +386,7 @@ impl<'a> PoolDispatcher<'a> { if is_canceled(&e) { RawResponse::err( id, - ErrorCode::RequestCancelled as i32, + ErrorCode::ContentModified as i32, e.to_string(), ) } else {