Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TextEdits support to InlayHints #2385

Merged
merged 10 commits into from
Apr 18, 2022
Prev Previous commit
Next Next commit
Fix Cake completion test.
  • Loading branch information
JoeRobich committed Apr 17, 2022
commit 4995db0da90d7667bb487f8c161b0520f2ef472a
12 changes: 2 additions & 10 deletions tests/OmniSharp.Cake.Tests/CompletionFacts.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using OmniSharp.Cake.Services.RequestHandlers.Completion;
Expand Down Expand Up @@ -103,16 +102,9 @@ public async Task ShouldRemoveAdditionalTextEditsFromResolvedCompletions()

// Populating the completion cache should take no more than a few ms, don't let it take too
// long
var cts = new CancellationTokenSource(millisecondsDelay: ImportCompletionTimeout);
await Task.Run(async () =>
{
while (completions.IsIncomplete)
{
completions = await FindCompletionsAsync(fileName, input, host);
cts.Token.ThrowIfCancellationRequested();
}
}, cts.Token);
await Task.Delay(ImportCompletionTimeout);

completions = await FindCompletionsAsync(fileName, input, host);
Assert.False(completions.IsIncomplete);
Assert.Contains("Regex", completions.Items.Select(c => c.TextEdit.NewText));

Expand Down