Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8185019

Browse files
Add ConfigurationItems to service collection
1 parent 83e3b4f commit 8185019

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

‎src/PowerShellEditorServices/Server/PsesServiceCollectionExtensions.cs‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
//
55

66
using System;
7-
using System.Collections.Generic;
8-
using System.Management.Automation.Host;
97
using Microsoft.Extensions.DependencyInjection;
108
using Microsoft.Extensions.Logging;
119
using Microsoft.PowerShell.EditorServices.Hosting;
1210
using Microsoft.PowerShell.EditorServices.Services;
11+
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
1312

1413
namespace Microsoft.PowerShell.EditorServices.Server
1514
{
@@ -43,7 +42,23 @@ public static IServiceCollection AddPsesLanguageServices(
4342
.Wait();
4443
return extensionService;
4544
})
46-
.AddSingleton<AnalysisService>();
45+
.AddSingleton<AnalysisService>()
46+
// NOTE: See `LanguageServerSettingsWrapper`
47+
.AddSingleton(
48+
new ConfigurationItem
49+
{
50+
Section = "powershell",
51+
})
52+
.AddSingleton(
53+
new ConfigurationItem
54+
{
55+
Section = "files",
56+
})
57+
.AddSingleton(
58+
new ConfigurationItem
59+
{
60+
Section = "search",
61+
});
4762
}
4863

4964
public static IServiceCollection AddPsesDebugServices(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /