diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-04 04:03:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-04 04:03:52 +0100 |
commit | 57ec813294368a25e424672ad13bcee47f19f1d2 (patch) | |
tree | 7ea4b38e450a3f6f1f81b3f7f6fa80d570b63c3b /crates | |
parent | 805c0b92ac577dcb8c4cddf567a2c7e216c4259c (diff) | |
parent | 87a18b18eab859cbfcbaf178bc6355215dae8381 (diff) |
Merge #4286
4286: Make incremental sync opt-in r=matklad a=lnicola
@matklad do you want to merge this? I'd make it opt-out, but it's fine to test it more.
Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/caps.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/caps.rs b/crates/rust-analyzer/src/caps.rs index 44222d8bd..680415cac 100644 --- a/crates/rust-analyzer/src/caps.rs +++ b/crates/rust-analyzer/src/caps.rs | |||
@@ -1,4 +1,5 @@ | |||
1 | //! Advertizes the capabilities of the LSP Server. | 1 | //! Advertizes the capabilities of the LSP Server. |
2 | use std::env; | ||
2 | 3 | ||
3 | use crate::semantic_tokens; | 4 | use crate::semantic_tokens; |
4 | 5 | ||
@@ -16,7 +17,11 @@ pub fn server_capabilities() -> ServerCapabilities { | |||
16 | ServerCapabilities { | 17 | ServerCapabilities { |
17 | text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions { | 18 | text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions { |
18 | open_close: Some(true), | 19 | open_close: Some(true), |
19 | change: Some(TextDocumentSyncKind::Incremental), | 20 | change: Some(if env::var("RA_PROFILE").is_ok() { |
21 | TextDocumentSyncKind::Incremental | ||
22 | } else { | ||
23 | TextDocumentSyncKind::Full | ||
24 | }), | ||
20 | will_save: None, | 25 | will_save: None, |
21 | will_save_wait_until: None, | 26 | will_save_wait_until: None, |
22 | save: Some(SaveOptions::default()), | 27 | save: Some(SaveOptions::default()), |