Skip to content

Commit 57ec813

Browse files
bors[bot]lnicola
andauthored
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 <lnicola@dend.ro>
2 parents 805c0b9 + 87a18b1 commit 57ec813

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/rust-analyzer/src/caps.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Advertizes the capabilities of the LSP Server.
2+
use std::env;
23

34
use crate::semantic_tokens;
45

@@ -16,7 +17,11 @@ pub fn server_capabilities() -> ServerCapabilities {
1617
ServerCapabilities {
1718
text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions {
1819
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+
}),
2025
will_save: None,
2126
will_save_wait_until: None,
2227
save: Some(SaveOptions::default()),

0 commit comments

Comments
 (0)