(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-requestprocedureConstruct a lsp-request struct.
lsp-request?procedureTest if a value is a lsp-request struct.
lsp-request-idprocedureGet the id field of a lsp-request struct.
lsp-request-methodprocedureGet the method field of a lsp-request struct.
lsp-request-paramsprocedureGet the params field of a lsp-request struct.
%lsp-notification--typevariableGet the params field of a lsp-request struct.
lsp-notificationprocedureConstruct a lsp-notification struct.
lsp-notification?procedureTest if a value is a lsp-notification struct.
lsp-notification-methodprocedureGet the method field of a lsp-notification struct.
lsp-notification-paramsprocedureGet the params field of a lsp-notification struct.
%lsp-response--typevariableGet the params field of a lsp-notification struct.
lsp-responseprocedureConstruct a lsp-response struct.
lsp-response?procedureTest if a value is a lsp-response struct.
lsp-response-idprocedureGet the id field of a lsp-response struct.
lsp-response-resultprocedureGet the result field of a lsp-response struct.
%lsp-error-response--typevariableGet the result field of a lsp-response struct.
lsp-error-responseprocedureConstruct a lsp-error-response struct.
lsp-error-response?procedureTest if a value is a lsp-error-response struct.
lsp-error-response-idprocedureGet the id field of a lsp-error-response struct.
lsp-error-response-codeprocedureGet the code field of a lsp-error-response struct.
lsp-error-response-messageprocedureGet the message field of a lsp-error-response struct.
lsp-error-response-dataprocedureGet the data field of a lsp-error-response struct.
read-framed-messageprocedureRead 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!procedureWrite a JSON body with LSP framing and flush the port.
parse-messagevariable(No description)
parse-message-stringvariable(No description)
make-responsevariable(No description)
make-error-responsevariable(No description)
make-notificationvariable(No description)
response->jsonvariable(No description)
error-response->jsonvariable(No description)
notification->jsonvariable(No description)
error-parsevariable(No description)
error-invalid-requestvariable(No description)
error-method-not-foundvariable(No description)
error-invalid-paramsvariable(No description)
error-internalvariable(No description)
error-server-not-initializedvariable(No description)
error-request-cancelledvariable(No description)
error-content-modifiedvariable(No description)