@@ -11,8 +11,8 @@ use lsp_types::{
1111use ra_ide:: {
1212 translate_offset_with_edit, CompletionItem , CompletionItemKind , FileId , FilePosition ,
1313 FileRange , FileSystemEdit , Fold , FoldKind , Highlight , HighlightModifier , HighlightTag ,
14- InsertTextFormat , LineCol , LineIndex , NavigationTarget , RangeInfo , ReferenceAccess , Severity ,
15- SourceChange , SourceFileEdit ,
14+ InlayHint , InlayKind , InsertTextFormat , LineCol , LineIndex , NavigationTarget , RangeInfo ,
15+ ReferenceAccess , Severity , SourceChange , SourceFileEdit ,
1616} ;
1717use ra_syntax:: { SyntaxKind , TextRange , TextUnit } ;
1818use ra_text_edit:: { AtomTextEdit , TextEdit } ;
@@ -323,6 +323,20 @@ impl ConvWith<&FoldConvCtx<'_>> for Fold {
323323 }
324324}
325325
326+ impl ConvWith < & LineIndex > for InlayHint {
327+ type Output = req:: InlayHint ;
328+ fn conv_with ( self , line_index : & LineIndex ) -> Self :: Output {
329+ req:: InlayHint {
330+ label : self . label . to_string ( ) ,
331+ range : self . range . conv_with ( line_index) ,
332+ kind : match self . kind {
333+ InlayKind :: ParameterHint => req:: InlayKind :: ParameterHint ,
334+ InlayKind :: TypeHint => req:: InlayKind :: TypeHint ,
335+ } ,
336+ }
337+ }
338+ }
339+
326340impl Conv for Highlight {
327341 type Output = ( u32 , u32 ) ;
328342
0 commit comments