ocaml-lsp icon indicating copy to clipboard operation
ocaml-lsp copied to clipboard

Add a custom query for documentation

Open pitag-ha opened this issue 1 year ago • 1 comments

Let's add a query that returns the documentation of a given identifier or of the identifier at a given position.

Current situation

Currently, the only way to retrieve documentation in OCaml LSP is via the hover query, which also returns type information and, potentially, more information.

Why to improve that

Particularly in non-visual editors such as Emacs and Vim, users will also want to access the documentation without extra information such as type information.

How to implement it

The LSP protocol doesn't have a dedicated documentation query. So, we'll need to implement a custom query for this. That custom query can mirror what Merlin server's document query does.

pitag-ha avatar Apr 30 '24 16:04 pitag-ha

Cc @3Rafal

pitag-ha avatar Apr 30 '24 16:04 pitag-ha

@voodoos @xvw We can close this as it's handled by #1336

PizieDust avatar Oct 08 '24 13:10 PizieDust