diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-28 11:36:13 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-28 11:36:13 +0100 |
commit | 80fdb13c475928c077fe2801fbc195c92128cd63 (patch) | |
tree | c44f1b83adefc1db48b81fec3b401b1e281ffaa4 | |
parent | bca00ac340522fa15f0fa00c6652097f4e86085c (diff) | |
parent | 2dee5930e01a905fbd0035b6a2ef86179577fe96 (diff) |
Merge #9036
9036: Remove undocumented `TextDocumentSyncKind::Full` support r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <[email protected]>
-rw-r--r-- | crates/rust-analyzer/src/caps.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/rust-analyzer/src/caps.rs b/crates/rust-analyzer/src/caps.rs index 4d88932ca..702efd8f8 100644 --- a/crates/rust-analyzer/src/caps.rs +++ b/crates/rust-analyzer/src/caps.rs | |||
@@ -1,6 +1,4 @@ | |||
1 | //! Advertises the capabilities of the LSP Server. | 1 | //! Advertises the capabilities of the LSP Server. |
2 | use std::env; | ||
3 | |||
4 | use lsp_types::{ | 2 | use lsp_types::{ |
5 | CallHierarchyServerCapability, ClientCapabilities, CodeActionKind, CodeActionOptions, | 3 | CallHierarchyServerCapability, ClientCapabilities, CodeActionKind, CodeActionOptions, |
6 | CodeActionProviderCapability, CodeLensOptions, CompletionOptions, | 4 | CodeActionProviderCapability, CodeLensOptions, CompletionOptions, |
@@ -21,11 +19,7 @@ pub fn server_capabilities(client_caps: &ClientCapabilities) -> ServerCapabiliti | |||
21 | ServerCapabilities { | 19 | ServerCapabilities { |
22 | text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions { | 20 | text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions { |
23 | open_close: Some(true), | 21 | open_close: Some(true), |
24 | change: Some(if env::var("RA_NO_INCREMENTAL_SYNC").is_ok() { | 22 | change: Some(TextDocumentSyncKind::Incremental), |
25 | TextDocumentSyncKind::Full | ||
26 | } else { | ||
27 | TextDocumentSyncKind::Incremental | ||
28 | }), | ||
29 | will_save: None, | 23 | will_save: None, |
30 | will_save_wait_until: None, | 24 | will_save_wait_until: None, |
31 | save: Some(SaveOptions::default().into()), | 25 | save: Some(SaveOptions::default().into()), |