Skip to content

Commit 1d531ff

Browse files
committed
Implemented -LanguageServiceOnly switch
1 parent 96a8207 commit 1d531ff

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

module/PowerShellEditorServices/Start-EditorServices.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ param(
6666
[switch]
6767
$DebugServiceOnly,
6868

69+
[switch]
70+
$LanguageServiceOnly,
71+
6972
[string[]]
7073
$AdditionalModules,
7174

src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ public StartEditorServicesCommand()
182182
[Parameter]
183183
public SwitchParameter DebugServiceOnly { get; set; }
184184

185+
/// <summary>
186+
/// When set, do not enable debug adapter, only the LSP service.
187+
/// </summary>
188+
[Parameter]
189+
public SwitchParameter LanguageServiceOnly { get; set; }
190+
185191
/// <summary>
186192
/// When set with a debug build, startup will wait for a debugger to attach.
187193
/// </summary>
@@ -465,6 +471,11 @@ private ITransportConfig GetDebugServiceTransport()
465471
{
466472
_logger.Log(PsesLogLevel.Diagnostic, "Configuring debug transport");
467473

474+
if(LanguageServiceOnly)
475+
{
476+
_logger.Log(PsesLogLevel.Diagnostic, "No Debug transport: PSES is language service only");
477+
return null;
478+
}
468479
if (Stdio)
469480
{
470481
if (DebugServiceOnly)

0 commit comments

Comments
 (0)