Skip to content

Commit 884c572

Browse files
committed
hls-notes-plugin: Improve "Note not found" error message
1 parent 76f3bef commit 884c572

File tree

1 file changed

+1
-1
lines changed
  • plugins/hls-notes-plugin/src/Ide/Plugin

1 file changed

+1
-1
lines changed

plugins/hls-notes-plugin/src/Ide/Plugin/Notes.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jumpToNote state _ param
8787
note <- err "No note at this position" $ listToMaybe $
8888
mapMaybe (atPos $ fromIntegral c) $ matchAllText noteRefRegex line
8989
notes <- runActionE "notes.definedNotes" state $ useE MkGetNotes nfp
90-
(noteFp, pos) <- err "Note not found" (HM.lookup note notes)
90+
(noteFp, pos) <- err ("Note definition (a comment of the form `{- Note [" <> note <> "]\\n~~~ ... -}`") (HM.lookup note notes)
9191
pure $ InL (Definition (InL
9292
(Location (fromNormalizedUri $ normalizedFilePathToUri noteFp) (Range pos pos))
9393
))

0 commit comments

Comments
 (0)