File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -792,3 +792,29 @@ export interface ClientCommandOptions {
792
792
commands: string [];
793
793
}
794
794
```
795
+
796
+ ## Colored Diagnostic Output
797
+
798
+ ** Experimental Client Capability:** ` { "colorDiagnosticOutput": boolean } `
799
+
800
+ If this capability is set, the "full compiler diagnostics" provided by ` checkOnSave `
801
+ will include ANSI color and style codes to render the diagnostic in a similar manner
802
+ as ` cargo ` . This is translated into ` --message-format=json-diagnostic-rendered-ansi `
803
+ when flycheck is run, instead of the default ` --message-format=json ` .
804
+
805
+ The full compiler rendered diagnostics are included in the server response
806
+ regardless of this capability:
807
+
808
+ ``` typescript
809
+ // https://microsoft.github.io/language-server-protocol/specifications/specification-current#diagnostic
810
+ export interface Diagnostic {
811
+ ...
812
+ data? : {
813
+ /**
814
+ * The human-readable compiler output as it would be printed to a terminal.
815
+ * Includes ANSI color and style codes if the client has set the experimental
816
+ * `colorDiagnosticOutput` capability.
817
+ */
818
+ rendered? : string ;
819
+ };
820
+ }
You can’t perform that action at this time.
0 commit comments