Skip to content

Commit

Permalink
Update our LanguageServer OmniSharp lib package version.
Browse files Browse the repository at this point in the history
- Consuming several quality of life changes from O#. Such as support multiple languages in file paths.
- This also prepares us to take the TextDocumentSynchronization fixes started here: OmniSharp/csharp-language-server-protocol#199
  • Loading branch information
NTaylorMullen committed Jan 13, 2020
1 parent 0048a8d commit d70baed
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<MoqPackageVersion>4.10.0</MoqPackageVersion>
<!-- STOP!!! We need to reference the version of JSON that our HOSTS supprt. -->
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
<OmniSharpExtensionsLanguageServerPackageVersion>0.13.1</OmniSharpExtensionsLanguageServerPackageVersion>
<OmniSharpExtensionsLanguageServerPackageVersion>0.14.1</OmniSharpExtensionsLanguageServerPackageVersion>
<OmniSharpMSBuildPackageVersion>1.33.0</OmniSharpMSBuildPackageVersion>
<VS_NewtonsoftJsonPackageVersion>12.0.2</VS_NewtonsoftJsonPackageVersion>
<VSMAC_NewtonsoftJsonPackageVersion>12.0.2</VSMAC_NewtonsoftJsonPackageVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,12 @@ public static async Task MainAsync(string[] args)

Serializer.Instance.JsonSerializer.Converters.RegisterRazorConverters();

var factory = new LoggerFactory();
ILanguageServer server = null;
server = await OmniSharp.Extensions.LanguageServer.Server.LanguageServer.From(options =>
options
.WithInput(Console.OpenStandardInput())
.WithOutput(Console.OpenStandardOutput())
.WithLoggerFactory(factory)
.AddDefaultLoggingProvider()
.WithMinimumLogLevel(logLevel)
.ConfigureLogging(builder => builder.SetMinimumLevel(logLevel))
.WithHandler<RazorDocumentSynchronizationEndpoint>()
.WithHandler<RazorCompletionEndpoint>()
.WithHandler<RazorHoverEndpoint>()
Expand Down Expand Up @@ -121,10 +118,10 @@ public static async Task MainAsync(string[] args)

// Workaround for https://github.com/OmniSharp/csharp-language-server-protocol/issues/106
var languageServer = (OmniSharp.Extensions.LanguageServer.Server.LanguageServer)server;
languageServer.MinimumLogLevel = logLevel;

try
{
var factory = new LoggerFactory();
var logger = factory.CreateLogger<Program>();
var assemblyInformationAttribute = typeof(Program).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
logger.LogInformation("Razor Language Server version " + assemblyInformationAttribute.InformationalVersion);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using OmniSharp.Extensions.Embedded.MediatR;
using MediatR;

namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using OmniSharp.Extensions.Embedded.MediatR;
using MediatR;

namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using OmniSharp.Extensions.Embedded.MediatR;
using MediatR;

namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Razor.LanguageServer.Common.Serialization;
using OmniSharp.Extensions.Embedded.MediatR;
using MediatR;

namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using OmniSharp.Extensions.Embedded.MediatR;
using MediatR;

namespace Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem;
using Microsoft.CodeAnalysis.Razor;
using Microsoft.CodeAnalysis.Text;
using Microsoft.Extensions.Logging;
using OmniSharp.Extensions.Embedded.MediatR;
using OmniSharp.Extensions.LanguageServer.Protocol;
using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using OmniSharp.Extensions.Embedded.MediatR;
using MediatR;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;

namespace Microsoft.AspNetCore.Razor.LanguageServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using OmniSharp.Extensions.Embedded.MediatR;
using MediatR;
using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range;

namespace Microsoft.AspNetCore.Razor.LanguageServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.Razor.LanguageServer.Common.Serialization;
using Microsoft.AspNetCore.Razor.LanguageServer.ProjectSystem;
using Microsoft.CodeAnalysis.Razor;
using Microsoft.CodeAnalysis.Razor.ProjectSystem;
using Microsoft.Extensions.Logging;
using OmniSharp.Extensions.Embedded.MediatR;

namespace Microsoft.AspNetCore.Razor.LanguageServer
{
Expand Down

0 comments on commit d70baed

Please sign in to comment.