Skip to content

Commit bf7a554

Browse files
jansorgjonahgraham
authored andcommitted
Add supportsANSIStyling capabilities to allow colorization of text from debug adapters.
1 parent 925c5a2 commit bf7a554

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,13 @@ 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 `supportsANSIStyling` is present in
266+
* both the adapter's `Capabilities` and the client's `InitializeRequestArguments`. A client may strip any
267+
* unrecognized ANSI sequences.
268+
* <p>
269+
* If the `supportsANSIStyling` capabilities are not both true, then the client should display the output literally.
270+
*/
265271
@NonNull
266272
String output;
267273
/**
@@ -915,6 +921,15 @@ class InitializeRequestArguments {
915921
* Since 1.59
916922
*/
917923
Boolean supportsStartDebuggingRequest;
924+
/**
925+
* The client will interpret ANSI escape sequences in the display of `OutputEvent.output` and `Variable.value`
926+
* fields when `Capabilities.supportsANSIStyling` is also enabled.
927+
* <p>
928+
* This is an optional property.
929+
* <p>
930+
* Since 1.69
931+
*/
932+
Boolean supportsANSIStyling;
918933
}
919934

920935
/**
@@ -2896,6 +2911,14 @@ class Capabilities {
28962911
* Since 1.65
28972912
*/
28982913
BreakpointMode[] breakpointModes;
2914+
/**
2915+
* The debug adapter supports ANSI escape sequences in styling of `OutputEvent.output` and `Variable.value` fields.
2916+
* <p>
2917+
* This is an optional property.
2918+
* <p>
2919+
* Since 1.69
2920+
*/
2921+
Boolean supportsANSIStyling;
28992922
}
29002923

29012924
/**

0 commit comments

Comments
 (0)