ocaml/merlin

Merlin-lib: return the description of a warning based on its identifier

xvw opened this issue · 1 comments

xvw commented

In order to make ocaml/ocaml-lsp#717, we'd like to add a function to merlin-lib.util to retrieve the description of a warning. The warnings are already located here: https://github.com/ocaml/merlin/blob/master/src/ocaml/utils/warnings.ml

Merlin has a command syntax-doc that returns information about certain syntax. I wonder if this will be a good use case for this issue given that we want to return information about the warning to the user.
To do so, a good place to start will be to include the description we want here: https://github.com/ocaml/merlin/blob/master/src/analysis/syntax_doc.ml
This way, when the user has the syntax-doc feature activated on their editor, they will be able to see the description each time they hover on the warning.