Skip to content

Commit 25b02fa

Browse files
committed
Add _code to pretty printing for FileDiagnostic
1 parent 4b452c9 commit 25b02fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ghcide/src/Development/IDE/Types/Diagnostics.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ prettyDiagnostic FileDiagnostic { fdFilePath, fdShouldShowDiagnostic, fdLspDiagn
188188
, slabel_ "Range: " $ prettyRange _range
189189
, slabel_ "Source: " $ pretty _source
190190
, slabel_ "Severity:" $ pretty $ show sev
191+
, slabel_ "Code: " $ case _code of
192+
Just (InR text) -> pretty text
193+
Just (InL i) -> pretty i
194+
Nothing -> "<none>"
191195
, slabel_ "Message: "
192196
$ case sev of
193197
LSP.DiagnosticSeverity_Error -> annotate $ color Red

0 commit comments

Comments
 (0)