aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-20 09:20:28 +0000
committerAleksey Kladov <[email protected]>2018-12-20 09:20:28 +0000
commitb2f2621c1717df3141ae292c303896fb427fd2f7 (patch)
tree2908f311027582c07ac5511737240eee6aee0113
parentdbb62b5baa36783bbca06f09c77794fce3ceff0c (diff)
Use ContentModified error code
https://github.com/Microsoft/language-server-protocol/commit/25679c2e4b26cb18af8c943319d40d4f3561a340
-rw-r--r--crates/gen_lsp_server/src/msg.rs1
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs2
2 files changed, 2 insertions, 1 deletions
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 {
55 ServerNotInitialized = -32002, 55 ServerNotInitialized = -32002,
56 UnknownErrorCode = -32001, 56 UnknownErrorCode = -32001,
57 RequestCancelled = -32800, 57 RequestCancelled = -32800,
58 ContentModified = -32801,
58} 59}
59 60
60#[derive(Debug, Serialize, Deserialize, Clone)] 61#[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> {
417 if is_canceled(&e) { 417 if is_canceled(&e) {
418 RawResponse::err( 418 RawResponse::err(
419 id, 419 id,
420 ErrorCode::RequestCancelled as i32, 420 ErrorCode::ContentModified as i32,
421 e.to_string(), 421 e.to_string(),
422 ) 422 )
423 } else { 423 } else {