diff --git a/CHANGELOG.md b/CHANGELOG.md
index eeb47abd0f..26ce5c1cc5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,18 @@
# Changelog
All changes to the project will be documented in this file.
+## [1.39.9] - 2023-10-04
+* Add Kind parameter to InlayHint (PR: [#2570](https://github.dev/OmniSharp/omnisharp-roslyn/pull/2570))
+* Do not include commit characters if the typed span is empty (PR: [#2569](https://github.com/OmniSharp/omnisharp-roslyn/pull/2569))
+* Update Roslyn to version 4.9.0-1.23504.3 (PR: [#2567](https://github.com/OmniSharp/omnisharp-roslyn/pull/2567))
+* Async diagnostics analyzer work queue (PR: [#2351](https://github.com/OmniSharp/omnisharp-roslyn/pull/2351))
+* Add InlayHint implementation to OmniSharp.LSP (PR: [#2566](https://github.com/OmniSharp/omnisharp-roslyn/pull/2566))
+* Include the project file name when invoking `dotnet build` (PR: [#2565](https://github.com/OmniSharp/omnisharp-roslyn/pull/2565))
+* feat: ignore diagnostics for generated code (PR: [#2509](https://github.com/OmniSharp/omnisharp-roslyn/pull/2509))
+* Update documentation to reflect --stdio flag deprecation (#2439) (PR: [#2554](https://github.com/OmniSharp/omnisharp-roslyn/pull/2554))
+* Update Roslyn to version 4.8.0-1.23374.10 (PR: [#2555](https://github.com/OmniSharp/omnisharp-roslyn/pull/2555))
+* Use double quote when quoting un script path (PR: [#2553](https://github.com/OmniSharp/omnisharp-roslyn/pull/2553))
+
## [1.39.8] - 2023-07-17
* Use core LSP TokenTypes where possible and validate token names (PR: [#2548](https://github.com/OmniSharp/omnisharp-roslyn/pull/2548))
diff --git a/src/OmniSharp.Abstractions/Models/v1/InlayHints/InlayHint.cs b/src/OmniSharp.Abstractions/Models/v1/InlayHints/InlayHint.cs
index 22a6dfcf7c..0c7f739fd9 100644
--- a/src/OmniSharp.Abstractions/Models/v1/InlayHints/InlayHint.cs
+++ b/src/OmniSharp.Abstractions/Models/v1/InlayHints/InlayHint.cs
@@ -16,6 +16,12 @@ public sealed record InlayHint
///
public string Label { get; set; }
+ ///
+ /// The kind of this hint. Can be omitted in which case the client
+ /// should fall back to a reasonable default.
+ ///
+ public InlayHintKind? Kind { get; set; }
+
///
/// The tooltip text when you hover over this item.
///
diff --git a/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpInlayHintHandler.cs b/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpInlayHintHandler.cs
index b2673e7b75..c3c831e61e 100644
--- a/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpInlayHintHandler.cs
+++ b/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpInlayHintHandler.cs
@@ -77,6 +77,7 @@ private static LSPInlayHint ToLSPInlayHint(OmniSharpInlayHint hint)
return new LSPInlayHint()
{
Label = trimmedLabel,
+ Kind = hint.Kind.HasValue ? ConvertEnum(hint.Kind.Value) : null,
Tooltip = hint.Tooltip is not null
? new MarkupContent() { Kind = MarkupKind.Markdown, Value = hint.Tooltip }
: null,
@@ -93,6 +94,7 @@ private static OmniSharpInlayHint FromLSPInlayHint(LSPInlayHint hint)
return new OmniSharpInlayHint()
{
Label = $"{(hint.PaddingLeft == true ? " " : "")}{hint.Label.String}{(hint.PaddingRight == true ? " " : "")}",
+ Kind = hint.Kind.HasValue ? ConvertEnum(hint.Kind.Value) : null,
Tooltip = hint.Tooltip is not null
? hint.Tooltip.HasMarkupContent
? hint.Tooltip.MarkupContent.Value
diff --git a/src/OmniSharp.Roslyn.CSharp/Services/InlayHints/InlayHintService.cs b/src/OmniSharp.Roslyn.CSharp/Services/InlayHints/InlayHintService.cs
index b741a37848..d97ca73794 100644
--- a/src/OmniSharp.Roslyn.CSharp/Services/InlayHints/InlayHintService.cs
+++ b/src/OmniSharp.Roslyn.CSharp/Services/InlayHints/InlayHintService.cs
@@ -35,6 +35,8 @@ internal class InlayHintService :
private readonly InlineHintCache _cache;
private readonly FormattingOptions _formattingOptions;
+ private const double ParameterRanking = 0.0;
+
[ImportingConstructor]
public InlayHintService(OmniSharpWorkspace workspace, FormattingOptions formattingOptions, ILoggerFactory loggerFactory, IOptionsMonitor omniSharpOptions)
{
@@ -140,6 +142,9 @@ public List MapAndCacheHints(ImmutableArray rosl
resultList.Add(new InlayHint()
{
Label = string.Concat(hint.DisplayParts),
+ Kind = hint.Ranking == ParameterRanking
+ ? InlayHintKind.Parameter
+ : InlayHintKind.Type,
Position = text.GetPointFromPosition(hint.Span.End),
TextEdits = ConvertToTextChanges(hint.ReplacementTextChange, text),
Data = (solutionVersionString, position)
diff --git a/tests/OmniSharp.Lsp.Tests/OmniSharpInlayHintHandlerFacts.cs b/tests/OmniSharp.Lsp.Tests/OmniSharpInlayHintHandlerFacts.cs
index 3d6d570dfc..904992d23d 100644
--- a/tests/OmniSharp.Lsp.Tests/OmniSharpInlayHintHandlerFacts.cs
+++ b/tests/OmniSharp.Lsp.Tests/OmniSharpInlayHintHandlerFacts.cs
@@ -42,10 +42,10 @@ class C { }
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 3, Character = 2 }, Label = "param1:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 2 }, End = new Position() { Line = 3, Character = 2 } }, NewText = "param1: " } }, PaddingLeft = false, PaddingRight = true },
- new InlayHint { Position = new Position { Line = 3, Character = 9 }, Label = "paramB:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 9 }, End = new Position() { Line = 3, Character = 9 } }, NewText = "paramB: " } }, PaddingLeft = false, PaddingRight = true },
- new InlayHint { Position = new Position { Line = 1, Character = 4 }, Label = "C", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 0 }, End = new Position() { Line = 1, Character = 3 } }, NewText = "C" } }, PaddingLeft = false, PaddingRight = true },
- new InlayHint { Position = new Position { Line = 2, Character = 4 }, Label = "C", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 0 }, End = new Position() { Line = 2, Character = 3 } }, NewText = "C" } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 3, Character = 2 }, Label = "param1:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 2 }, End = new Position() { Line = 3, Character = 2 } }, NewText = "param1: " } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 3, Character = 9 }, Label = "paramB:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 9 }, End = new Position() { Line = 3, Character = 9 } }, NewText = "paramB: " } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 1, Character = 4 }, Label = "C", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 0 }, End = new Position() { Line = 1, Character = 3 } }, NewText = "C" } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 2, Character = 4 }, Label = "C", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 0 }, End = new Position() { Line = 2, Character = 3 } }, NewText = "C" } }, PaddingLeft = false, PaddingRight = true },
},
inlayHints,
ignoreDataComparer);
@@ -94,8 +94,8 @@ void M(int param1, int paramB) { }
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 1, Character = 4 }, Label = "int", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 0 }, End = new Position() { Line = 1, Character = 3 } }, NewText = "int" } }, PaddingLeft = false, PaddingRight = true },
- new InlayHint { Position = new Position { Line = 2, Character = 4 }, Label = "int", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 0 }, End = new Position() { Line = 2, Character = 3 } }, NewText = "int" } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 1, Character = 4 }, Label = "int", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 0 }, End = new Position() { Line = 1, Character = 3 } }, NewText = "int" } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 2, Character = 4 }, Label = "int", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 0 }, End = new Position() { Line = 2, Character = 3 } }, NewText = "int" } }, PaddingLeft = false, PaddingRight = true },
},
response,
ignoreDataComparer);
@@ -120,8 +120,8 @@ void M(int param1, int paramB) { }
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 3, Character = 2 }, Label = "param1:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 2 }, End = new Position() { Line = 3, Character = 2 } }, NewText = "param1: " } }, PaddingLeft = false, PaddingRight = true },
- new InlayHint { Position = new Position { Line = 3, Character = 9 }, Label = "paramB:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 9 }, End = new Position() { Line = 3, Character = 9 } }, NewText = "paramB: " } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 3, Character = 2 }, Label = "param1:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 2 }, End = new Position() { Line = 3, Character = 2 } }, NewText = "param1: " } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 3, Character = 9 }, Label = "paramB:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 9 }, End = new Position() { Line = 3, Character = 9 } }, NewText = "paramB: " } }, PaddingLeft = false, PaddingRight = true },
},
response,
ignoreDataComparer);
@@ -149,7 +149,7 @@ public async Task InlayHintsForVarTypes(string fileName)
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 1, Character = 4 }, Label = "int", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 0 }, End = new Position() { Line = 1, Character = 3 } }, NewText = "int" } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 1, Character = 4 }, Label = "int", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 0 }, End = new Position() { Line = 1, Character = 3 } }, NewText = "int" } }, PaddingLeft = false, PaddingRight = true },
},
response,
ignoreDataComparer);
@@ -179,8 +179,8 @@ public async Task InlayHintsForLambdaParameterTypes(string fileName)
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 2, Character = 34 }, Label = "int", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 34 }, End = new Position() { Line = 2, Character = 34 } }, NewText = "int " } }, PaddingLeft = false, PaddingRight = true },
- new InlayHint { Position = new Position { Line = 2, Character = 37 }, Label = "string", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 37 }, End = new Position() { Line = 2, Character = 37 } }, NewText = "string " } }, PaddingLeft = false, PaddingRight = true }
+ new InlayHint { Position = new Position { Line = 2, Character = 34 }, Label = "int", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 34 }, End = new Position() { Line = 2, Character = 34 } }, NewText = "int " } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 2, Character = 37 }, Label = "string", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 37 }, End = new Position() { Line = 2, Character = 37 } }, NewText = "string " } }, PaddingLeft = false, PaddingRight = true }
},
response,
ignoreDataComparer);
@@ -209,7 +209,7 @@ public async Task InlayHintsForImplicitObjectCreation(string fileName)
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 1, Character = 14 }, Label = "string", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 14 }, End = new Position() { Line = 1, Character = 14 } }, NewText = " string" } }, PaddingLeft = true, PaddingRight = false }
+ new InlayHint { Position = new Position { Line = 1, Character = 14 }, Label = "string", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 14 }, End = new Position() { Line = 1, Character = 14 } }, NewText = " string" } }, PaddingLeft = true, PaddingRight = false }
},
response,
ignoreDataComparer);
@@ -239,7 +239,7 @@ void M(int i) {}
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 1, Character = 2 }, Label = "i:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 2 }, End = new Position() { Line = 1, Character = 2 } }, NewText = "i: " } }, PaddingLeft = false, PaddingRight = true }
+ new InlayHint { Position = new Position { Line = 1, Character = 2 }, Label = "i:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 2 }, End = new Position() { Line = 1, Character = 2 } }, NewText = "i: " } }, PaddingLeft = false, PaddingRight = true }
},
response,
ignoreDataComparer);
@@ -275,8 +275,8 @@ class C
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 3, Character = 2 }, Label = "test:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 2 }, End = new Position() { Line = 3, Character = 2 } }, NewText = "test: " } }, PaddingLeft = false, PaddingRight = true },
- new InlayHint { Position = new Position { Line = 3, Character = 9 }, Label = "test:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 9 }, End = new Position() { Line = 3, Character = 9 } }, NewText = "test: " } }, PaddingLeft = false, PaddingRight = true }
+ new InlayHint { Position = new Position { Line = 3, Character = 2 }, Label = "test:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 2 }, End = new Position() { Line = 3, Character = 2 } }, NewText = "test: " } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 3, Character = 9 }, Label = "test:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 3, Character = 9 }, End = new Position() { Line = 3, Character = 9 } }, NewText = "test: " } }, PaddingLeft = false, PaddingRight = true }
},
response,
ignoreDataComparer);
@@ -312,7 +312,7 @@ class C
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 2, Character = 2 }, Label = "c:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 2 }, End = new Position() { Line = 2, Character = 2 } }, NewText = "c: " } }, PaddingLeft = false, PaddingRight = true }
+ new InlayHint { Position = new Position { Line = 2, Character = 2 }, Label = "c:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 2 }, End = new Position() { Line = 2, Character = 2 } }, NewText = "c: " } }, PaddingLeft = false, PaddingRight = true }
},
response,
ignoreDataComparer);
@@ -345,7 +345,7 @@ void M(int test) {}
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 2, Character = 2 }, Label = "test:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 2 }, End = new Position() { Line = 2, Character = 2 } }, NewText = "test: " } }, PaddingLeft = false, PaddingRight = true }
+ new InlayHint { Position = new Position { Line = 2, Character = 2 }, Label = "test:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 2 }, End = new Position() { Line = 2, Character = 2 } }, NewText = "test: " } }, PaddingLeft = false, PaddingRight = true }
},
response,
ignoreDataComparer);
@@ -376,8 +376,8 @@ void M(int test1, int test2) {}
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 1, Character = 2 }, Label = "test1:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 2 }, End = new Position() { Line = 1, Character = 2 } }, NewText = "test1: " } }, PaddingLeft = false, PaddingRight = true },
- new InlayHint { Position = new Position { Line = 1, Character = 5 }, Label = "test2:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 5 }, End = new Position() { Line = 1, Character = 5 } }, NewText = "test2: " } }, PaddingLeft = false, PaddingRight = true }
+ new InlayHint { Position = new Position { Line = 1, Character = 2 }, Label = "test1:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 2 }, End = new Position() { Line = 1, Character = 2 } }, NewText = "test1: " } }, PaddingLeft = false, PaddingRight = true },
+ new InlayHint { Position = new Position { Line = 1, Character = 5 }, Label = "test2:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 5 }, End = new Position() { Line = 1, Character = 5 } }, NewText = "test2: " } }, PaddingLeft = false, PaddingRight = true }
},
response,
ignoreDataComparer);
@@ -411,7 +411,7 @@ public static void EnableSomething(bool enabled) {}
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 1, Character = 18 }, Label = "enabled:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 18 }, End = new Position() { Line = 1, Character = 18 } }, NewText = "enabled: " } }, PaddingLeft = false, PaddingRight = true }
+ new InlayHint { Position = new Position { Line = 1, Character = 18 }, Label = "enabled:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 1, Character = 18 }, End = new Position() { Line = 1, Character = 18 } }, NewText = "enabled: " } }, PaddingLeft = false, PaddingRight = true }
},
response,
ignoreDataComparer);
@@ -446,7 +446,7 @@ public static void M(int i) {}
var response = await GetInlayHints(fileName, code);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Position { Line = 2, Character = 4 }, Label = "i:", Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 4 }, End = new Position() { Line = 2, Character = 4 } }, NewText = "i: " } }, PaddingLeft = false, PaddingRight = true }
+ new InlayHint { Position = new Position { Line = 2, Character = 4 }, Label = "i:", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new TextEdit { Range = new Range() { Start = new Position() { Line = 2, Character = 4 }, End = new Position() { Line = 2, Character = 4 } }, NewText = "i: " } }, PaddingLeft = false, PaddingRight = true }
},
response,
ignoreDataComparer);
diff --git a/tests/OmniSharp.Roslyn.CSharp.Tests/InlayHintsFacts.cs b/tests/OmniSharp.Roslyn.CSharp.Tests/InlayHintsFacts.cs
index 04754a3438..79c3b3765c 100644
--- a/tests/OmniSharp.Roslyn.CSharp.Tests/InlayHintsFacts.cs
+++ b/tests/OmniSharp.Roslyn.CSharp.Tests/InlayHintsFacts.cs
@@ -37,10 +37,10 @@ class C { }
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 3, Column = 2 }, Label = "param1: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 2, EndLine = 3, EndColumn = 2, NewText = "param1: " } } },
- new InlayHint { Position = new Point { Line = 3, Column = 9 }, Label = "paramB: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 9, EndLine = 3, EndColumn = 9, NewText = "paramB: " } } },
- new InlayHint { Position = new Point { Line = 1, Column = 4 }, Label = "C ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 0, EndLine = 1, EndColumn = 3, NewText = "C" } } },
- new InlayHint { Position = new Point { Line = 2, Column = 4 }, Label = "C ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 0, EndLine = 2, EndColumn = 3, NewText = "C" } } },
+ new InlayHint { Position = new Point { Line = 3, Column = 2 }, Label = "param1: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 2, EndLine = 3, EndColumn = 2, NewText = "param1: " } } },
+ new InlayHint { Position = new Point { Line = 3, Column = 9 }, Label = "paramB: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 9, EndLine = 3, EndColumn = 9, NewText = "paramB: " } } },
+ new InlayHint { Position = new Point { Line = 1, Column = 4 }, Label = "C ", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 0, EndLine = 1, EndColumn = 3, NewText = "C" } } },
+ new InlayHint { Position = new Point { Line = 2, Column = 4 }, Label = "C ", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 0, EndLine = 2, EndColumn = 3, NewText = "C" } } },
},
response.InlayHints);
@@ -88,8 +88,8 @@ void M(int param1, int paramB) { }
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 1, Column = 4 }, Label = "int ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 0, EndLine = 1, EndColumn = 3, NewText = "int" } } },
- new InlayHint { Position = new Point { Line = 2, Column = 4 }, Label = "int ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 0, EndLine = 2, EndColumn = 3, NewText = "int" } } },
+ new InlayHint { Position = new Point { Line = 1, Column = 4 }, Label = "int ", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 0, EndLine = 1, EndColumn = 3, NewText = "int" } } },
+ new InlayHint { Position = new Point { Line = 2, Column = 4 }, Label = "int ", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 0, EndLine = 2, EndColumn = 3, NewText = "int" } } },
},
response.InlayHints);
}
@@ -113,8 +113,8 @@ void M(int param1, int paramB) { }
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 3, Column = 2 }, Label = "param1: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 2, EndLine = 3, EndColumn = 2, NewText = "param1: " } } },
- new InlayHint { Position = new Point { Line = 3, Column = 9 }, Label = "paramB: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 9, EndLine = 3, EndColumn = 9, NewText = "paramB: " } } },
+ new InlayHint { Position = new Point { Line = 3, Column = 2 }, Label = "param1: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 2, EndLine = 3, EndColumn = 2, NewText = "param1: " } } },
+ new InlayHint { Position = new Point { Line = 3, Column = 9 }, Label = "paramB: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 9, EndLine = 3, EndColumn = 9, NewText = "paramB: " } } },
},
response.InlayHints);
}
@@ -142,7 +142,7 @@ public async Task InlayHintsForVarTypes(string fileName)
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 1, Column = 4 }, Label = "int ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 0, EndLine = 1, EndColumn = 3, NewText = "int" } } },
+ new InlayHint { Position = new Point { Line = 1, Column = 4 }, Label = "int ", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 0, EndLine = 1, EndColumn = 3, NewText = "int" } } },
},
response.InlayHints);
}
@@ -171,8 +171,8 @@ public async Task InlayHintsForLambdaParameterTypes(string fileName)
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 2, Column = 34 }, Label = "int ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 34, EndLine = 2, EndColumn = 34, NewText = "int " } } },
- new InlayHint { Position = new Point { Line = 2, Column = 37 }, Label = "string ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 37, EndLine = 2, EndColumn = 37, NewText = "string " } } }
+ new InlayHint { Position = new Point { Line = 2, Column = 34 }, Label = "int ", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 34, EndLine = 2, EndColumn = 34, NewText = "int " } } },
+ new InlayHint { Position = new Point { Line = 2, Column = 37 }, Label = "string ", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 37, EndLine = 2, EndColumn = 37, NewText = "string " } } }
},
response.InlayHints);
}
@@ -200,7 +200,7 @@ public async Task InlayHintsForImplicitObjectCreation(string fileName)
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 1, Column = 14 }, Label = " string", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 14, EndLine = 1, EndColumn = 14, NewText = " string" } } }
+ new InlayHint { Position = new Point { Line = 1, Column = 14 }, Label = " string", Kind = InlayHintKind.Type, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 14, EndLine = 1, EndColumn = 14, NewText = " string" } } }
},
response.InlayHints);
}
@@ -229,7 +229,7 @@ void M(int i) {}
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 1, Column = 2 }, Label = "i: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 2, EndLine = 1, EndColumn = 2, NewText = "i: " } } }
+ new InlayHint { Position = new Point { Line = 1, Column = 2 }, Label = "i: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 2, EndLine = 1, EndColumn = 2, NewText = "i: " } } }
},
response.InlayHints);
}
@@ -264,8 +264,8 @@ class C
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 3, Column = 2 }, Label = "test: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 2, EndLine = 3, EndColumn = 2, NewText = "test: " } } },
- new InlayHint { Position = new Point { Line = 3, Column = 9 }, Label = "test: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 9, EndLine = 3, EndColumn = 9, NewText = "test: " } } }
+ new InlayHint { Position = new Point { Line = 3, Column = 2 }, Label = "test: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 2, EndLine = 3, EndColumn = 2, NewText = "test: " } } },
+ new InlayHint { Position = new Point { Line = 3, Column = 9 }, Label = "test: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 3, StartColumn = 9, EndLine = 3, EndColumn = 9, NewText = "test: " } } }
},
response.InlayHints);
}
@@ -300,7 +300,7 @@ class C
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 2, Column = 2 }, Label = "c: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 2, EndLine = 2, EndColumn = 2, NewText = "c: " } } }
+ new InlayHint { Position = new Point { Line = 2, Column = 2 }, Label = "c: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 2, EndLine = 2, EndColumn = 2, NewText = "c: " } } }
},
response.InlayHints);
}
@@ -333,7 +333,7 @@ void M(int test) {}
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 2, Column = 2 }, Label = "test: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 2, EndLine = 2, EndColumn = 2, NewText = "test: " } } }
+ new InlayHint { Position = new Point { Line = 2, Column = 2 }, Label = "test: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 2, EndLine = 2, EndColumn = 2, NewText = "test: " } } }
},
response.InlayHints);
}
@@ -364,8 +364,8 @@ void M(int test1, int test2) {}
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 1, Column = 2 }, Label = "test1: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 2, EndLine = 1, EndColumn = 2, NewText = "test1: " } } },
- new InlayHint { Position = new Point { Line = 1, Column = 5 }, Label = "test2: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 5, EndLine = 1, EndColumn = 5, NewText = "test2: " } } }
+ new InlayHint { Position = new Point { Line = 1, Column = 2 }, Label = "test1: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 2, EndLine = 1, EndColumn = 2, NewText = "test1: " } } },
+ new InlayHint { Position = new Point { Line = 1, Column = 5 }, Label = "test2: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 5, EndLine = 1, EndColumn = 5, NewText = "test2: " } } }
},
response.InlayHints);
}
@@ -398,7 +398,7 @@ public static void EnableSomething(bool enabled) {}
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 1, Column = 18 }, Label = "enabled: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 18, EndLine = 1, EndColumn = 18, NewText = "enabled: " } } }
+ new InlayHint { Position = new Point { Line = 1, Column = 18 }, Label = "enabled: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 1, StartColumn = 18, EndLine = 1, EndColumn = 18, NewText = "enabled: " } } }
},
response.InlayHints);
}
@@ -433,7 +433,7 @@ public static void M(int i) {}
var response = await GetInlayHints(fileName, code, testHost);
AssertEx.Equal(new[]
{
- new InlayHint { Position = new Point { Line = 2, Column = 4 }, Label = "i: ", Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 4, EndLine = 2, EndColumn = 4, NewText = "i: " } } }
+ new InlayHint { Position = new Point { Line = 2, Column = 4 }, Label = "i: ", Kind = InlayHintKind.Parameter, Tooltip = null, TextEdits = new[] { new LinePositionSpanTextChange { StartLine = 2, StartColumn = 4, EndLine = 2, EndColumn = 4, NewText = "i: " } } }
},
response.InlayHints);
}