Skip to content

Commit f81c92a

Browse files
Show tooltip for comparison operators (#1294)
1 parent 8460b3d commit f81c92a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ private static CompletionItem CreateCompletionItem(
266266
{
267267
detailString = matches[0].Groups[1].Value;
268268
}
269+
// The comparison operators (-eq, -not, -gt, etc) are unfortunately fall into ParameterName
270+
// but they don't have a type associated to them. This allows those tooltips to show up.
271+
else if (!string.IsNullOrEmpty(completionDetails.ToolTipText))
272+
{
273+
detailString = completionDetails.ToolTipText;
274+
}
269275
break;
270276
case CompletionType.Command:
271277
// For Commands, let's extract the resolved command or the path for an exe

0 commit comments

Comments
 (0)