diff options
author | kjeremy <[email protected]> | 2020-10-23 22:36:22 +0100 |
---|---|---|
committer | kjeremy <[email protected]> | 2020-10-26 13:23:34 +0000 |
commit | 2d4be2ef2a12886c526c07ad411406393c2c4b7e (patch) | |
tree | 1d3bf49b3c35cf59553e4e6d41a85166cf49e39c /crates/rust-analyzer/src/main_loop.rs | |
parent | 5444978f682b9a5e437e1080fb9343f2d66e1804 (diff) |
Request a refresh of semantic tokens if things are loaded up
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index ed5292733..ff855fe1a 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs | |||
@@ -330,6 +330,12 @@ impl GlobalState { | |||
330 | .collect::<Vec<_>>(); | 330 | .collect::<Vec<_>>(); |
331 | 331 | ||
332 | self.update_file_notifications_on_threadpool(subscriptions); | 332 | self.update_file_notifications_on_threadpool(subscriptions); |
333 | |||
334 | // Refresh semantic tokens if the client supports it. | ||
335 | if self.config.semantic_tokens_refresh { | ||
336 | self.semantic_tokens_cache.lock().clear(); | ||
337 | self.send_request::<lsp_types::request::SemanticTokensRefesh>((), |_, _| ()); | ||
338 | } | ||
333 | } | 339 | } |
334 | 340 | ||
335 | if let Some(diagnostic_changes) = self.diagnostics.take_changes() { | 341 | if let Some(diagnostic_changes) = self.diagnostics.take_changes() { |