Skip to content

Commit 8f1b62c

Browse files
committed
pull in options changes from main
1 parent 6e4305b commit 8f1b62c

File tree

8 files changed

+1
-82
lines changed

8 files changed

+1
-82
lines changed

src/EditorFeatures/Core/Implementation/LanguageServer/AbstractInProcLanguageClient.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
using System.IO;
99
using System.Threading;
1010
using System.Threading.Tasks;
11-
using Microsoft.CodeAnalysis;
1211
using Microsoft.CodeAnalysis.Diagnostics;
13-
using Microsoft.CodeAnalysis.Editor.Implementation.LanguageServer;
1412
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
15-
using Microsoft.CodeAnalysis.Host;
1613
using Microsoft.CodeAnalysis.LanguageServer;
1714
using Microsoft.CodeAnalysis.Options;
1815
using Microsoft.CodeAnalysis.Shared.TestHooks;
@@ -39,11 +36,7 @@ internal abstract partial class AbstractInProcLanguageClient : ILanguageClient,
3936
private readonly AbstractRequestDispatcherFactory _requestDispatcherFactory;
4037
private readonly ILspWorkspaceRegistrationService _lspWorkspaceRegistrationService;
4138

42-
<<<<<<< HEAD
4339
protected readonly IGlobalOptionService GlobalOptions;
44-
=======
45-
protected readonly HostWorkspaceServices WorkspaceServices;
46-
>>>>>>> 85406c0cb03 (Move LSP client integration down to editor features to support VSMac)
4740

4841
/// <summary>
4942
/// Created when <see cref="ActivateAsync"/> is called.
@@ -88,11 +81,7 @@ public event AsyncEventHandler<EventArgs>? StopAsync { add { } remove { } }
8881

8982
public AbstractInProcLanguageClient(
9083
AbstractRequestDispatcherFactory requestDispatcherFactory,
91-
<<<<<<< HEAD
9284
IGlobalOptionService globalOptions,
93-
=======
94-
ILspWorkspaceServicesProvider workspaceServicesProvider,
95-
>>>>>>> 85406c0cb03 (Move LSP client integration down to editor features to support VSMac)
9685
IDiagnosticService? diagnosticService,
9786
IAsynchronousOperationListenerProvider listenerProvider,
9887
ILspWorkspaceRegistrationService lspWorkspaceRegistrationService,
@@ -101,18 +90,13 @@ public AbstractInProcLanguageClient(
10190
string? diagnosticsClientName)
10291
{
10392
_requestDispatcherFactory = requestDispatcherFactory;
104-
<<<<<<< HEAD
10593
GlobalOptions = globalOptions;
106-
=======
107-
>>>>>>> 85406c0cb03 (Move LSP client integration down to editor features to support VSMac)
10894
_diagnosticService = diagnosticService;
10995
_listenerProvider = listenerProvider;
11096
_lspWorkspaceRegistrationService = lspWorkspaceRegistrationService;
11197
_diagnosticsClientName = diagnosticsClientName;
11298
_lspLoggerFactory = lspLoggerFactory;
11399
_threadingContext = threadingContext;
114-
115-
WorkspaceServices = workspaceServicesProvider.GetHostWorkspaceServices();
116100
}
117101

118102
public async Task<Connection?> ActivateAsync(CancellationToken cancellationToken)

src/EditorFeatures/Core/Implementation/LanguageServer/AlwaysActivateInProcLanguageClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.ComponentModel.Composition;
88
using Microsoft.CodeAnalysis.Diagnostics;
99
using Microsoft.CodeAnalysis.Editor;
10-
using Microsoft.CodeAnalysis.Editor.Implementation.LanguageServer;
1110
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
1211
using Microsoft.CodeAnalysis.Host.Mef;
1312
using Microsoft.CodeAnalysis.LanguageServer;
@@ -57,7 +56,7 @@ public override ServerCapabilities GetCapabilities(ClientCapabilities clientCapa
5756
var serverCapabilities = new VSInternalServerCapabilities();
5857

5958
// If the LSP editor feature flag is enabled advertise support for LSP features here so they are available locally and remote.
60-
var isLspEditorEnabled = WorkspaceServices.GetRequiredService<IExperimentationService>().IsExperimentEnabled(DefaultWorkspaceContextService.LspEditorFeatureFlagName);
59+
var isLspEditorEnabled = GlobalOptions.GetOption(LspOptions.LspEditorFeatureFlag);
6160
if (isLspEditorEnabled)
6261
{
6362
serverCapabilities = (VSInternalServerCapabilities)_defaultCapabilitiesProvider.GetCapabilities(clientCapabilities);

src/EditorFeatures/Core/Implementation/LanguageServer/ILspWorkspaceServicesProvider.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/EditorFeatures/Core/Implementation/LanguageServer/LiveShareInProcLanguageClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Collections.Immutable;
77
using System.ComponentModel.Composition;
88
using Microsoft.CodeAnalysis.Diagnostics;
9-
using Microsoft.CodeAnalysis.Editor.Implementation.LanguageServer;
109
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
1110
using Microsoft.CodeAnalysis.Host.Mef;
1211
using Microsoft.CodeAnalysis.LanguageServer;

src/EditorFeatures/Core/Implementation/LanguageServer/RazorInProcLanguageClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Collections.Immutable;
77
using System.ComponentModel.Composition;
88
using Microsoft.CodeAnalysis.Diagnostics;
9-
using Microsoft.CodeAnalysis.Editor.Implementation.LanguageServer;
109
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
1110
using Microsoft.CodeAnalysis.Host.Mef;
1211
using Microsoft.CodeAnalysis.LanguageServer;

src/VisualStudio/Core/Def/Implementation/LanguageClient/VisualStudioLspWorkspaceServicesProvider.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/VisualStudio/Xaml/Impl/Implementation/LanguageClient/XamlInProcLanguageClient.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
using Microsoft.CodeAnalysis.Diagnostics;
99
using Microsoft.CodeAnalysis.Editor;
1010
using Microsoft.CodeAnalysis.Editor.Implementation.LanguageClient;
11-
using Microsoft.CodeAnalysis.Editor.Implementation.LanguageServer;
1211
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
1312
using Microsoft.CodeAnalysis.Editor.Xaml;
1413
using Microsoft.CodeAnalysis.Host.Mef;
1514
using Microsoft.CodeAnalysis.LanguageServer;
1615
using Microsoft.CodeAnalysis.Options;
1716
using Microsoft.CodeAnalysis.Shared.TestHooks;
18-
using Microsoft.VisualStudio.Experimentation;
1917
using Microsoft.VisualStudio.LanguageServer.Client;
2018
using Microsoft.VisualStudio.LanguageServer.Protocol;
2119
using Microsoft.VisualStudio.LanguageServices.Xaml.LanguageServer;
@@ -35,21 +33,13 @@ internal class XamlInProcLanguageClient : AbstractInProcLanguageClient
3533
[Obsolete(MefConstruction.ImportingConstructorMessage, true)]
3634
public XamlInProcLanguageClient(
3735
XamlRequestDispatcherFactory xamlDispatcherFactory,
38-
<<<<<<< HEAD
3936
IGlobalOptionService globalOptions,
40-
=======
41-
ILspWorkspaceServicesProvider workspaceServices,
42-
>>>>>>> 85406c0cb03 (Move LSP client integration down to editor features to support VSMac)
4337
IDiagnosticService diagnosticService,
4438
IAsynchronousOperationListenerProvider listenerProvider,
4539
ILspWorkspaceRegistrationService lspWorkspaceRegistrationService,
4640
ILspLoggerFactory lspLoggerFactory,
4741
IThreadingContext threadingContext)
48-
<<<<<<< HEAD
4942
: base(xamlDispatcherFactory, globalOptions, diagnosticService, listenerProvider, lspWorkspaceRegistrationService, lspLoggerFactory, threadingContext, diagnosticsClientName: null)
50-
=======
51-
: base(xamlDispatcherFactory, workspaceServices, diagnosticService, listenerProvider, lspWorkspaceRegistrationService, lspLoggerFactory, threadingContext, diagnosticsClientName: null)
52-
>>>>>>> 85406c0cb03 (Move LSP client integration down to editor features to support VSMac)
5343
{
5444
}
5545

@@ -74,13 +64,6 @@ public override ServerCapabilities GetCapabilities(ClientCapabilities clientCapa
7464
public override bool ShowNotificationOnInitializeFailed => IsXamlLspIntelliSenseEnabled();
7565

7666
private bool IsXamlLspIntelliSenseEnabled()
77-
<<<<<<< HEAD
7867
=> GlobalOptions.GetOption(XamlOptions.EnableLspIntelliSenseFeatureFlag);
79-
=======
80-
{
81-
var experimentationService = WorkspaceServices.GetRequiredService<CodeAnalysis.Experiments.IExperimentationService>();
82-
return experimentationService.IsExperimentEnabled(StringConstants.EnableLspIntelliSense);
83-
}
84-
>>>>>>> 85406c0cb03 (Move LSP client integration down to editor features to support VSMac)
8568
}
8669
}

src/VisualStudio/Xaml/Impl/Implementation/LanguageClient/XamlInProcLanguageClientDisableUX.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Microsoft.CodeAnalysis.Diagnostics;
99
using Microsoft.CodeAnalysis.Editor;
1010
using Microsoft.CodeAnalysis.Editor.Implementation.LanguageClient;
11-
using Microsoft.CodeAnalysis.Editor.Implementation.LanguageServer;
1211
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
1312
using Microsoft.CodeAnalysis.Editor.Xaml;
1413
using Microsoft.CodeAnalysis.Host.Mef;

0 commit comments

Comments
 (0)