Skip to content

Commit 5acffec

Browse files
committed
Moce to diagnostic related information
1 parent db83076 commit 5acffec

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ghcide/src/Development/IDE/Core/Shake.hs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,18 @@ updateFileDiagnostics recorder fp ver k ShakeExtras{diagnostics, hiddenDiagnosti
12331233
return action
12341234
where
12351235
diagsFromRule :: Diagnostic -> Diagnostic
1236-
diagsFromRule c
1237-
| coerce ideTesting = c{_code = Just $ InR $ T.pack(show k)}
1236+
diagsFromRule c@Diagnostic{_range}
1237+
| coerce ideTesting = c
1238+
{_relatedInformation =
1239+
Just $ List [
1240+
DiagnosticRelatedInformation
1241+
(Location
1242+
(filePathToUri $ fromNormalizedFilePath fp)
1243+
_range
1244+
)
1245+
(T.pack $ show k)
1246+
]
1247+
}
12381248
| otherwise = c
12391249

12401250

0 commit comments

Comments
 (0)