package linol

  1. Overview
  2. Docs

Module Server.MakeSource

Server interface for some IO substrate

Parameters

module IO : sig ... end

Signature

Sourcemodule Position = Lsp.Types.Position
Sourcemodule Range = Lsp.Types.Range
Sourcemodule Diagnostic = Lsp.Types.Diagnostic
Sourcemodule DiagnosticSeverity = Lsp.Types.DiagnosticSeverity
Sourcemodule Req_id = Req_id
Sourceclass virtual base_server : object ... end

The server baseclass

Sourceclass notify_back : notify_back:(Lsp.Server_notification.t -> unit IO.t) -> ?version:int option -> ?uri:Lsp.Types.DocumentUri.t option -> unit -> object ... end

A wrapper to more easily reply to notifications

Sourcetype nonrec doc_state = doc_state = {
  1. uri : Lsp.Types.DocumentUri.t;
  2. languageId : string;
  3. version : int;
  4. content : string;
}

Current state of a document.

Sourceclass virtual server : object ... end

An easily overloadable class. Pick the methods you want to support. The user must provide at least the callbacks for document lifecycle: open, close, update. The most basic LSP server should check documents when they're updated and report diagnostics back to the editor.

OCaml

Innovation. Community. Security.