aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/main_loop.rs
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2020-07-24 22:55:17 +0100
committerJeremy Kolb <[email protected]>2020-08-01 01:57:53 +0100
commitfcfd7cb1e38bc20240e466dbda64386e0cc89247 (patch)
treef0e4b61091d5bf165b3321644c7a9bc3a5547439 /crates/rust-analyzer/src/main_loop.rs
parent2346a28c638dc8fe945059b68126d268dd7fb690 (diff)
Handle semantic token deltas
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r--crates/rust-analyzer/src/main_loop.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 0ace4cb45..eb2a86972 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -387,6 +387,9 @@ impl GlobalState {
387 handlers::handle_call_hierarchy_outgoing, 387 handlers::handle_call_hierarchy_outgoing,
388 )? 388 )?
389 .on::<lsp_types::request::SemanticTokensRequest>(handlers::handle_semantic_tokens)? 389 .on::<lsp_types::request::SemanticTokensRequest>(handlers::handle_semantic_tokens)?
390 .on::<lsp_types::request::SemanticTokensEditsRequest>(
391 handlers::handle_semantic_tokens_edits,
392 )?
390 .on::<lsp_types::request::SemanticTokensRangeRequest>( 393 .on::<lsp_types::request::SemanticTokensRangeRequest>(
391 handlers::handle_semantic_tokens_range, 394 handlers::handle_semantic_tokens_range,
392 )? 395 )?
@@ -449,6 +452,8 @@ impl GlobalState {
449 None => log::error!("orphan DidCloseTextDocument: {}", path), 452 None => log::error!("orphan DidCloseTextDocument: {}", path),
450 } 453 }
451 454
455 this.semantic_tokens_cache.lock().unwrap().remove(&params.text_document.uri);
456
452 if let Some(path) = path.as_path() { 457 if let Some(path) = path.as_path() {
453 this.loader.handle.invalidate(path.to_path_buf()); 458 this.loader.handle.invalidate(path.to_path_buf());
454 } 459 }