Handle semantic token deltas

This commit is contained in:
kjeremy
2020-07-24 17:55:17 -04:00
committed by Jeremy Kolb
parent 2346a28c63
commit fcfd7cb1e3
7 changed files with 213 additions and 13 deletions

View File

@@ -387,6 +387,9 @@ impl GlobalState {
handlers::handle_call_hierarchy_outgoing,
)?
.on::<lsp_types::request::SemanticTokensRequest>(handlers::handle_semantic_tokens)?
.on::<lsp_types::request::SemanticTokensEditsRequest>(
handlers::handle_semantic_tokens_edits,
)?
.on::<lsp_types::request::SemanticTokensRangeRequest>(
handlers::handle_semantic_tokens_range,
)?
@@ -449,6 +452,8 @@ impl GlobalState {
None => log::error!("orphan DidCloseTextDocument: {}", path),
}
this.semantic_tokens_cache.lock().unwrap().remove(&params.text_document.uri);
if let Some(path) = path.as_path() {
this.loader.handle.invalidate(path.to_path_buf());
}