Skip to content

Commit

Permalink
Clarify query specification
Browse files Browse the repository at this point in the history
  • Loading branch information
xvw committed May 22, 2024
1 parent da7b389 commit 77a2fd8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ocaml-lsp-server/docs/ocamllsp/merlinCallCompatible-specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ clients capable of fallbacking on Merlin in the event of a missing feature.

### Why this custom request needed

A temporary solution to ensure that LSP can be used as a primary front-end as
quickly as possible. The interest in this query will diminish as iterations
attempt to achieve parity of functionality with `ocamlmerlin`.
It allows editor plugin to communicate with the ocaml-lsp-server using the
merlin protocol, it will be useful for text-based editors that want to preserve
the classic Merlin UI while using ocaml-lsp-server. (It is a temporary solution
that will progressively be replaced by tailored custom requests filling the gaps
in the protocol)

## Client capability

nothing that should be noted. But each Merlin command should be handled
specifically by customers.
There is no client capability relative to this request

## Server capability

Expand Down Expand Up @@ -45,6 +46,10 @@ property type: `boolean`
- `resultAsSexp`: a flag indicating whether the result should be returned in
SEXP (`true`) or JSON (`false`), by default: `false`

For an exhaustive description of what the query returns, please refer to the
[Merlin
protocol](https://github.com/ocaml/merlin/blob/master/doc/dev/PROTOCOL.md)

## Response

```json
Expand All @@ -57,8 +62,3 @@ property type: `boolean`
- `resultAsSexp`: `true` if the command was invoked with the `resultAsSexp` flag,
`false` otherwise
- `result`: the result in string (in JSON or SEXP)


If Merlin produces an error, it will be described in the same way as the binary
in the result. If parameters are badly formed (or missing) or if the command
invoked does not exist in Merlin, invoking the request throws an exception.

0 comments on commit 77a2fd8

Please sign in to comment.