diff options
Diffstat (limited to 'crates')
-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()), |