mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +00:00
Make incremental sync opt-in
This commit is contained in:
parent
76c2f4ef49
commit
87a18b18ea
1 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
//! Advertizes the capabilities of the LSP Server.
|
||||
use std::env;
|
||||
|
||||
use crate::semantic_tokens;
|
||||
|
||||
|
@ -16,7 +17,11 @@ pub fn server_capabilities() -> ServerCapabilities {
|
|||
ServerCapabilities {
|
||||
text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions {
|
||||
open_close: Some(true),
|
||||
change: Some(TextDocumentSyncKind::Incremental),
|
||||
change: Some(if env::var("RA_PROFILE").is_ok() {
|
||||
TextDocumentSyncKind::Incremental
|
||||
} else {
|
||||
TextDocumentSyncKind::Full
|
||||
}),
|
||||
will_save: None,
|
||||
will_save_wait_until: None,
|
||||
save: Some(SaveOptions::default()),
|
||||
|
|
Loading…
Reference in a new issue