Skip to content

Add a custom query for documentation #1244

Closed
@pitag-ha

Description

@pitag-ha

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions