@@ -17,8 +17,8 @@ use lsp_types::{
1717 CallHierarchyOutgoingCall , CallHierarchyOutgoingCallsParams , CallHierarchyPrepareParams ,
1818 CodeActionKind , CodeLens , Command , CompletionItem , Diagnostic , DocumentFormattingParams ,
1919 DocumentHighlight , DocumentSymbol , FoldingRange , FoldingRangeParams , HoverContents , Location ,
20- Position , PrepareRenameResponse , Range , RenameParams , SemanticTokensEditResult ,
21- SemanticTokensEditsParams , SemanticTokensParams , SemanticTokensRangeParams ,
20+ Position , PrepareRenameResponse , Range , RenameParams , SemanticTokensDeltaParams ,
21+ SemanticTokensFullDeltaResult , SemanticTokensParams , SemanticTokensRangeParams ,
2222 SemanticTokensRangeResult , SemanticTokensResult , SymbolInformation , SymbolTag ,
2323 TextDocumentIdentifier , Url , WorkspaceEdit ,
2424} ;
@@ -1171,11 +1171,11 @@ pub(crate) fn handle_call_hierarchy_outgoing(
11711171 Ok ( Some ( res) )
11721172}
11731173
1174- pub ( crate ) fn handle_semantic_tokens (
1174+ pub ( crate ) fn handle_semantic_tokens_full (
11751175 snap : GlobalStateSnapshot ,
11761176 params : SemanticTokensParams ,
11771177) -> Result < Option < SemanticTokensResult > > {
1178- let _p = profile:: span ( "handle_semantic_tokens " ) ;
1178+ let _p = profile:: span ( "handle_semantic_tokens_full " ) ;
11791179
11801180 let file_id = from_proto:: file_id ( & snap, & params. text_document . uri ) ?;
11811181 let text = snap. analysis . file_text ( file_id) ?;
@@ -1190,11 +1190,11 @@ pub(crate) fn handle_semantic_tokens(
11901190 Ok ( Some ( semantic_tokens. into ( ) ) )
11911191}
11921192
1193- pub ( crate ) fn handle_semantic_tokens_edits (
1193+ pub ( crate ) fn handle_semantic_tokens_full_delta (
11941194 snap : GlobalStateSnapshot ,
1195- params : SemanticTokensEditsParams ,
1196- ) -> Result < Option < SemanticTokensEditResult > > {
1197- let _p = profile:: span ( "handle_semantic_tokens_edits " ) ;
1195+ params : SemanticTokensDeltaParams ,
1196+ ) -> Result < Option < SemanticTokensFullDeltaResult > > {
1197+ let _p = profile:: span ( "handle_semantic_tokens_full_delta " ) ;
11981198
11991199 let file_id = from_proto:: file_id ( & snap, & params. text_document . uri ) ?;
12001200 let text = snap. analysis . file_text ( file_id) ?;
@@ -1209,9 +1209,9 @@ pub(crate) fn handle_semantic_tokens_edits(
12091209
12101210 if let Some ( prev_id) = & cached_tokens. result_id {
12111211 if * prev_id == params. previous_result_id {
1212- let edits = to_proto:: semantic_token_edits ( & cached_tokens, & semantic_tokens) ;
1212+ let delta = to_proto:: semantic_token_delta ( & cached_tokens, & semantic_tokens) ;
12131213 * cached_tokens = semantic_tokens;
1214- return Ok ( Some ( edits . into ( ) ) ) ;
1214+ return Ok ( Some ( delta . into ( ) ) ) ;
12151215 }
12161216 }
12171217
0 commit comments