@@ -8,7 +8,7 @@ use std::{
8
8
process:: { self , Stdio } ,
9
9
} ;
10
10
11
- use anyhow:: Context ;
11
+ use anyhow:: { bail , Context } ;
12
12
13
13
use ide:: {
14
14
AnnotationConfig , AssistKind , AssistResolveStrategy , Cancellable , CompletionFieldsToResolve ,
@@ -21,11 +21,12 @@ use lsp_server::ErrorCode;
21
21
use lsp_types:: {
22
22
CallHierarchyIncomingCall , CallHierarchyIncomingCallsParams , CallHierarchyItem ,
23
23
CallHierarchyOutgoingCall , CallHierarchyOutgoingCallsParams , CallHierarchyPrepareParams ,
24
- CodeLens , CompletionItem , FoldingRange , FoldingRangeParams , HoverContents , InlayHint ,
25
- InlayHintParams , Location , LocationLink , Position , PrepareRenameResponse , Range , RenameParams ,
26
- ResourceOp , ResourceOperationKind , SemanticTokensDeltaParams , SemanticTokensFullDeltaResult ,
27
- SemanticTokensParams , SemanticTokensRangeParams , SemanticTokensRangeResult ,
28
- SemanticTokensResult , SymbolInformation , SymbolTag , TextDocumentIdentifier , Url , WorkspaceEdit ,
24
+ CodeLens , CompletionItem , CompletionTriggerKind , FoldingRange , FoldingRangeParams ,
25
+ HoverContents , InlayHint , InlayHintParams , Location , LocationLink , Position ,
26
+ PrepareRenameResponse , Range , RenameParams , ResourceOp , ResourceOperationKind ,
27
+ SemanticTokensDeltaParams , SemanticTokensFullDeltaResult , SemanticTokensParams ,
28
+ SemanticTokensRangeParams , SemanticTokensRangeResult , SemanticTokensResult , SymbolInformation ,
29
+ SymbolTag , TextDocumentIdentifier , Url , WorkspaceEdit ,
29
30
} ;
30
31
use paths:: Utf8PathBuf ;
31
32
use project_model:: { CargoWorkspace , ManifestPath , ProjectWorkspaceKind , TargetKind } ;
@@ -1068,6 +1069,7 @@ pub(crate) fn handle_completion(
1068
1069
let _p = tracing:: info_span!( "handle_completion" ) . entered ( ) ;
1069
1070
let mut position = from_proto:: file_position ( & snap, text_document_position. clone ( ) ) ?;
1070
1071
let line_index = snap. file_line_index ( position. file_id ) ?;
1072
+ let context2 = context. clone ( ) ;
1071
1073
let completion_trigger_character =
1072
1074
context. and_then ( |ctx| ctx. trigger_character ) . and_then ( |s| s. chars ( ) . next ( ) ) ;
1073
1075
@@ -1083,6 +1085,11 @@ pub(crate) fn handle_completion(
1083
1085
None => return Ok ( None ) ,
1084
1086
Some ( items) => items,
1085
1087
} ;
1088
+ if context2. is_some_and ( |ctx| {
1089
+ ctx. trigger_kind == CompletionTriggerKind :: TRIGGER_FOR_INCOMPLETE_COMPLETIONS
1090
+ } ) {
1091
+ bail ! ( "TEST" )
1092
+ }
1086
1093
1087
1094
let items = to_proto:: completion_items (
1088
1095
& snap. config ,
@@ -1145,12 +1152,14 @@ pub(crate) fn handle_completion_resolve(
1145
1152
resolved_completions,
1146
1153
) ;
1147
1154
1155
+ tracing:: error!( "resolve {:?}" , resolve_data. completion_item_index) ;
1148
1156
let mut resolved_completion =
1149
1157
if resolved_completions. get ( resolve_data. completion_item_index ) . is_some ( ) {
1150
1158
resolved_completions. swap_remove ( resolve_data. completion_item_index )
1151
1159
} else {
1152
1160
return Ok ( original_completion) ;
1153
1161
} ;
1162
+ tracing:: error!( "resolve {:?}" , resolved_completion. label) ;
1154
1163
1155
1164
if !resolve_data. imports . is_empty ( ) {
1156
1165
let additional_edits = snap
0 commit comments