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

Marked /autocomplete as obsolete #1951

Merged
merged 3 commits into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace OmniSharp.Roslyn.CSharp.Services.Intellisense
{
[Obsolete("Please use CompletionService.")]
[OmniSharpHandler(OmniSharpEndpoints.AutoComplete, LanguageNames.CSharp)]
public class IntellisenseService : IRequestHandler<AutoCompleteRequest, IEnumerable<AutoCompleteResponse>>
{
Expand Down
27 changes: 27 additions & 0 deletions tests/OmniSharp.Roslyn.CSharp.Tests/IntellisenseFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,33 @@ void M()
Assert.Contains(@"The ""G"" standard format specifier", gStandardCompletion.Description);
}

[ConditionalTheory(typeof(WindowsOnly))]
[InlineData("dummy.cs")]
[InlineData("dummy.csx")]
public async Task Embedded_language_completion_provider_for_regex(string filename)
{
const string source = @"
using System;
using System.Text.RegularExpressions;
class C
{
void M()
{
var r = Regex.Match(""foo"", ""$$""
}
}
";

var completions = await FindCompletionsAsync(filename, source);

Assert.NotEmpty(completions);

var wCompletion = completions.FirstOrDefault(x => x.CompletionText == @"\w");
Assert.NotNull(wCompletion);
Assert.Equal("word character", wCompletion.DisplayText);
Assert.Contains(@"matches any word character", wCompletion.Description);
}

[Fact]
public async Task Scripting_by_default_returns_completions_for_CSharp7_1()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net472</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<WarningsNotAsErrors>CS0618</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down