Skip to content

Commit ded43a6

Browse files
committed
Get more specific with the filter
1 parent 87b7b01 commit ded43a6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ public override async Task<InlayHintContainer> Handle(InlayHintParams request, C
6161

6262
IEnumerable<InlayHint> inlayHints =
6363
from s in symbolReferences
64-
where s.Type == SymbolType.Variable | s.Type == SymbolType.Parameter
64+
where s.Type is SymbolType.Variable or SymbolType.Parameter
6565
select new InlayHint
6666
{
67-
Kind = InlayHintKind.Type,
67+
Kind = s.Type is SymbolType.Parameter ? InlayHintKind.Parameter : InlayHintKind.Type,
68+
// TODO: Integrate ScriptPositionAdapter once rename PR is merged
6869
Position = new Position(
6970
s.ScriptRegion.StartLineNumber - 1,
70-
s.ScriptRegion.StartColumnNumber - 1),
71+
s.ScriptRegion.StartColumnNumber - 1
72+
),
7173
Label = "TypeGoesHere:" //Fixme: Get the type of the symbol
7274
};
7375

0 commit comments

Comments
 (0)