package linol

  1. Overview
  2. Docs

Server interface for some IO substrate

Parameters

module IO : sig ... end

Signature

module Position = Lsp.Types.Position
module Range = Lsp.Types.Range
module Diagnostic = Lsp.Types.Diagnostic
module DiagnosticSeverity = Lsp.Types.DiagnosticSeverity
module Req_id = Req_id
class virtual base_server : object ... end

The server baseclass

class 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

type 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.

class 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.