package lsp
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=fd138e6c4fcff32c6d15eb66cc9391b7e1183717a6d1a47c688c7f6d320a159f
sha512=567a73b3c10bb59c5a4d4e8291d1aeefdfd34438a95313fba8a485638294ca5fb8034334719631243c304d3328c27afa90dfd564fdb1e7390507a06db3a4ad03
doc/lsp.stdune/Stdune/User_message/index.html
Module Stdune.User_message
Source
A message for the user
User messages are styled document that can be printed to the console or in the log file.
Symbolic styles that can be used inside messages. These styles are later converted to actual concrete styles depending on the output device. For instance, when printed to the terminal they are converted to ansi terminal styles (Ansi_color.Style.t list
values).
A user message.contents composed of an optional file location and a list of paragraphs.
The various paragraphs will be printed one after the other and will all start at the beginning of a line. They are all wrapped inside a Pp.box
.
When hints are provided, they are printed as last paragraphs and prefixed with "Hint:". Hints should give indication to the user for how to fix the issue.
val make :
?loc:Stdune__.Loc0.t ->
?prefix:Style.t Pp.t ->
?hints:Style.t Pp.t list ->
Style.t Pp.t list ->
t
Construct a user message from a list of paragraphs.
The first paragraph is prefixed with prefix
inside the box. prefix
should not end with a space as a space is automatically inserted by make
if necessary.
Print to stdout
(not thread safe)
Print to stderr
(not thread safe)
Produces a "Did you mean ...?" hint