package lsp
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=598e27258e4749b6e2511e2c5efe00d16f0965806296e808d202cd614d655fba
sha512=febe80f8a88fac7683cafbd045dceee4869beda1f250b78a1d94d3ad19e746388d24869e805abcb2f33f93687508d65db19a38424c1059670915c050b4f6dbb9
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