@@ -1009,7 +1009,6 @@ private static CompletionItem CreateCompletionItem(
10091009 {
10101010 string detailString = null ;
10111011 string documentationString = null ;
1012- string labelString = completionDetails . ListItemText ;
10131012
10141013 if ( ( completionDetails . CompletionType == CompletionType . Variable ) ||
10151014 ( completionDetails . CompletionType == CompletionType . ParameterName ) )
@@ -1022,11 +1021,6 @@ private static CompletionItem CreateCompletionItem(
10221021 {
10231022 detailString = matches [ 0 ] . Groups [ 1 ] . Value ;
10241023 }
1025-
1026- // PowerShell returns ListItemText for parameters & variables that is not prefixed
1027- // and it needs to be or the completion will not appear for these CompletionTypes.
1028- string prefix = ( completionDetails . CompletionType == CompletionType . Variable ) ? "$" : "-" ;
1029- labelString = prefix + completionDetails . ListItemText ;
10301024 }
10311025 else if ( ( completionDetails . CompletionType == CompletionType . Method ) ||
10321026 ( completionDetails . CompletionType == CompletionType . Property ) )
@@ -1063,13 +1057,13 @@ private static CompletionItem CreateCompletionItem(
10631057 // completion list. Technically we don't need the ListItemText at all but it may come
10641058 // in handy during debug.
10651059 var sortText = ( completionDetails . CompletionType == CompletionType . ParameterName )
1066- ? string . Format ( "{0 :D3}{1}" , sortIndex , completionDetails . ListItemText )
1067- : null ;
1060+ ? $ " { sortIndex : D3} { completionDetails . ListItemText } "
1061+ : null ;
10681062
10691063 return new CompletionItem
10701064 {
10711065 InsertText = completionDetails . CompletionText ,
1072- Label = labelString ,
1066+ Label = completionDetails . ListItemText ,
10731067 Kind = MapCompletionKind ( completionDetails . CompletionType ) ,
10741068 Detail = detailString ,
10751069 Documentation = documentationString ,
0 commit comments