sigildocs

(sigil lsp protocol)

(sigil lsp protocol) - LSP JSON-RPC 2.0 framing and message shapes.

LSP uses JSON-RPC 2.0 with Content-Length header-based framing over stdio. This module handles reading and writing framed messages and exposes the request/notification/response shapes used by the rest of the server.

Exports

lsp-requestprocedure

Construct a lsp-request struct.

lsp-request?procedure

Test if a value is a lsp-request struct.

Get the id field of a lsp-request struct.

Get the method field of a lsp-request struct.

Get the params field of a lsp-request struct.

Get the params field of a lsp-request struct.

Construct a lsp-notification struct.

Test if a value is a lsp-notification struct.

Get the method field of a lsp-notification struct.

Get the params field of a lsp-notification struct.

Get the params field of a lsp-notification struct.

lsp-responseprocedure

Construct a lsp-response struct.

lsp-response?procedure

Test if a value is a lsp-response struct.

Get the id field of a lsp-response struct.

Get the result field of a lsp-response struct.

Get the result field of a lsp-response struct.

Construct a lsp-error-response struct.

Test if a value is a lsp-error-response struct.

Get the id field of a lsp-error-response struct.

Get the code field of a lsp-error-response struct.

Get the message field of a lsp-error-response struct.

Get the data field of a lsp-error-response struct.

Read one framed message from PORT. Returns:

  • a parsed lsp-request/lsp-notification on success,
  • the eof-object at EOF,
  • #f on framing/parse error (caller may send a parse error).
write-framed!procedure

Write a JSON body with LSP framing and flush the port.

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)

error-parsevariable

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)