Skip to content

Commit 78017eb

Browse files
bors[bot]lnicolalonesometraveler
authored
Merge #4286 #4287
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. 4287: Update debugging.md r=matklad a=lonesometraveler Co-authored-by: Laurențiu Nicola <lnicola@dend.ro> Co-authored-by: KENTARO OKUDA <lonesometraveler@mac.com>
3 parents baa35b0 + 87a18b1 + 42e2eca commit 78017eb

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
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()),

docs/dev/debugging.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ where **only** the `rust-analyzer` extension being debugged is enabled.
2626
- `Run Extension (Dev Server)` - runs extension with the locally built LSP server (`target/debug/rust-analyzer`).
2727

2828
TypeScript debugging is configured to watch your source edits and recompile.
29-
To apply changes to an already running debug process press <kbd>Ctrl+Shift+P</kbd> and run the following command in your `[Extension Development Host]`
29+
To apply changes to an already running debug process, press <kbd>Ctrl+Shift+P</kbd> and run the following command in your `[Extension Development Host]`
3030

3131
```
3232
> Developer: Reload Window
@@ -76,11 +76,11 @@ Make sure you open a rust file in the `[Extension Development Host]` and try aga
7676

7777
Make sure you have run `echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope`.
7878

79-
By default this should reset back to 1 everytime you log in.
79+
By default this should reset back to 1 every time you log in.
8080

8181
### Breakpoints are never being hit
8282

83-
Check your version of `lldb` if it's version 6 and lower use the `classic` adapter type.
83+
Check your version of `lldb`. If it's version 6 and lower, use the `classic` adapter type.
8484
It's `lldb.adapterType` in settings file.
8585

86-
If you're running `lldb` version 7 change the lldb adapter type to `bundled` or `native`.
86+
If you're running `lldb` version 7, change the lldb adapter type to `bundled` or `native`.

0 commit comments

Comments
 (0)