aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/handlers.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-05-17 16:37:06 +0100
committerAleksey Kladov <[email protected]>2021-05-17 16:37:06 +0100
commit41510f437e87e013f2015bed1a964163c6d3f1ff (patch)
treeead7add1ada64dfad8e819a32a5ea4ffa8c0cd60 /crates/rust-analyzer/src/handlers.rs
parentf9d4a9eaee6f86d9bd60cf6d18ec744b56696135 (diff)
minor: adjust config name
Diffstat (limited to 'crates/rust-analyzer/src/handlers.rs')
-rw-r--r--crates/rust-analyzer/src/handlers.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 85e45337c..8fe97fd7c 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -1394,9 +1394,9 @@ pub(crate) fn handle_semantic_tokens_full(
1394 let line_index = snap.file_line_index(file_id)?; 1394 let line_index = snap.file_line_index(file_id)?;
1395 1395
1396 let highlights = snap.analysis.highlight(file_id)?; 1396 let highlights = snap.analysis.highlight(file_id)?;
1397 let semantic_strings = snap.config.semantic_strings(); 1397 let highlight_strings = snap.config.highlighting_strings();
1398 let semantic_tokens = 1398 let semantic_tokens =
1399 to_proto::semantic_tokens(&text, &line_index, highlights, semantic_strings); 1399 to_proto::semantic_tokens(&text, &line_index, highlights, highlight_strings);
1400 1400
1401 // Unconditionally cache the tokens 1401 // Unconditionally cache the tokens
1402 snap.semantic_tokens_cache.lock().insert(params.text_document.uri, semantic_tokens.clone()); 1402 snap.semantic_tokens_cache.lock().insert(params.text_document.uri, semantic_tokens.clone());
@@ -1415,9 +1415,9 @@ pub(crate) fn handle_semantic_tokens_full_delta(
1415 let line_index = snap.file_line_index(file_id)?; 1415 let line_index = snap.file_line_index(file_id)?;
1416 1416
1417 let highlights = snap.analysis.highlight(file_id)?; 1417 let highlights = snap.analysis.highlight(file_id)?;
1418 let semantic_strings = snap.config.semantic_strings(); 1418 let highlight_strings = snap.config.highlighting_strings();
1419 let semantic_tokens = 1419 let semantic_tokens =
1420 to_proto::semantic_tokens(&text, &line_index, highlights, semantic_strings); 1420 to_proto::semantic_tokens(&text, &line_index, highlights, highlight_strings);
1421 1421
1422 let mut cache = snap.semantic_tokens_cache.lock(); 1422 let mut cache = snap.semantic_tokens_cache.lock();
1423 let cached_tokens = cache.entry(params.text_document.uri).or_default(); 1423 let cached_tokens = cache.entry(params.text_document.uri).or_default();
@@ -1446,9 +1446,9 @@ pub(crate) fn handle_semantic_tokens_range(
1446 let line_index = snap.file_line_index(frange.file_id)?; 1446 let line_index = snap.file_line_index(frange.file_id)?;
1447 1447
1448 let highlights = snap.analysis.highlight_range(frange)?; 1448 let highlights = snap.analysis.highlight_range(frange)?;
1449 let semantic_strings = snap.config.semantic_strings(); 1449 let highlight_strings = snap.config.highlighting_strings();
1450 let semantic_tokens = 1450 let semantic_tokens =
1451 to_proto::semantic_tokens(&text, &line_index, highlights, semantic_strings); 1451 to_proto::semantic_tokens(&text, &line_index, highlights, highlight_strings);
1452 Ok(Some(semantic_tokens.into())) 1452 Ok(Some(semantic_tokens.into()))
1453} 1453}
1454 1454