@@ -1009,7 +1009,6 @@ private static CompletionItem CreateCompletionItem(
1009
1009
{
1010
1010
string detailString = null ;
1011
1011
string documentationString = null ;
1012
- string labelString = completionDetails . ListItemText ;
1013
1012
1014
1013
if ( ( completionDetails . CompletionType == CompletionType . Variable ) ||
1015
1014
( completionDetails . CompletionType == CompletionType . ParameterName ) )
@@ -1022,11 +1021,6 @@ private static CompletionItem CreateCompletionItem(
1022
1021
{
1023
1022
detailString = matches [ 0 ] . Groups [ 1 ] . Value ;
1024
1023
}
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 ;
1030
1024
}
1031
1025
else if ( ( completionDetails . CompletionType == CompletionType . Method ) ||
1032
1026
( completionDetails . CompletionType == CompletionType . Property ) )
@@ -1063,13 +1057,13 @@ private static CompletionItem CreateCompletionItem(
1063
1057
// completion list. Technically we don't need the ListItemText at all but it may come
1064
1058
// in handy during debug.
1065
1059
var sortText = ( completionDetails . CompletionType == CompletionType . ParameterName )
1066
- ? string . Format ( "{0 :D3}{1}" , sortIndex , completionDetails . ListItemText )
1067
- : null ;
1060
+ ? $ " { sortIndex : D3} { completionDetails . ListItemText } "
1061
+ : null ;
1068
1062
1069
1063
return new CompletionItem
1070
1064
{
1071
1065
InsertText = completionDetails . CompletionText ,
1072
- Label = labelString ,
1066
+ Label = completionDetails . ListItemText ,
1073
1067
Kind = MapCompletionKind ( completionDetails . CompletionType ) ,
1074
1068
Detail = detailString ,
1075
1069
Documentation = documentationString ,
0 commit comments