helix/helix-lsp/src
Michael Davis 22298434f1
jsonrpc: Skip serializing params if params are None ()
The JSONRPC spec says:

> If present, parameters for the rpc call MUST be provided as a
> Structured value

https://www.jsonrpc.org/specification#parameter_structures

(Where a "Structured value" is elsewhere defined as either a map or
array.)

This change skips the serialization of the `params` field for JSONRPC
method calls and notifications if the `params` field is the `None`
variant. This fixes compatibility with LSP servers which adhere closely
to that part of the spec: `ocamllsp` in the wild.
2023-01-10 18:31:41 +09:00
..
client.rs allow specifying environment for language servers in language.toml () 2022-12-08 22:09:23 -06:00
jsonrpc.rs jsonrpc: Skip serializing params if params are None () 2023-01-10 18:31:41 +09:00
lib.rs allow specifying environment for language servers in language.toml () 2022-12-08 22:09:23 -06:00
transport.rs Drain pending requests on language server termination () 2022-11-24 11:07:42 +09:00