Skip to content

Commit 6affbd2

Browse files
committed
Add supportsANSIStyling capabilities to allow colorization of text from debug adapters
1 parent d8239e5 commit 6affbd2

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

org.eclipse.lsp4j.debug/src/main/java/org/eclipse/lsp4j/debug/DebugProtocol.xtend

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,15 @@ class OutputEventArguments {
261261
String category;
262262
/**
263263
* The output to report.
264-
*/
264+
* <p>
265+
* ANSI escape sequences may be used to influence text color and styling if
266+
* `supportsANSIStyling` is present in both the adapter's `Capabilities` and
267+
* the client's `InitializeRequestArguments`. A client may strip any
268+
* unrecognized ANSI sequences.
269+
* <p>
270+
* If the `supportsANSIStyling` capabilities are not both true, then the
271+
* client should display the output literally.
272+
*/
265273
@NonNull
266274
String output;
267275
/**
@@ -913,6 +921,12 @@ class InitializeRequestArguments {
913921
* Since 1.59
914922
*/
915923
Boolean supportsStartDebuggingRequest;
924+
/**
925+
* The client will interpret ANSI escape sequences in the display of
926+
* `OutputEvent.output` and `Variable.value` fields when
927+
* `Capabilities.supportsANSIStyling` is also enabled.
928+
*/
929+
Boolean supportsANSIStyling;
916930
}
917931

918932
/**
@@ -2849,6 +2863,11 @@ class Capabilities {
28492863
* Since 1.65
28502864
*/
28512865
BreakpointMode[] breakpointModes;
2866+
/**
2867+
* The debug adapter supports ANSI escape sequences in styling of
2868+
* `OutputEvent.output` and `Variable.value` fields.
2869+
*/
2870+
Boolean supportsANSIStyling;
28522871
}
28532872

28542873
/**

0 commit comments

Comments
 (0)