package coq-lsp
Language Server Protocol native server for Coq
Install
Dune Dependency
Authors
Maintainers
Sources
coq-lsp-0.1.9.8.17.tbz
sha256=a89d86ed8b19d09bf3a06acbed690ae2859a7343d9faa03537c76cd492371651
sha512=edae491b284d5ab586c82cea4003a5b477f41ab25a4659431d4bc8caaee39b62de03b64d088ab8c528416210f88f73d4dfe5efbd32b22c70b75c9d18999c1e00
doc/src/coq-lsp.fleche/io.ml.html
Source file io.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
module Level = struct type t = int (* We follow LSP spec *) let error = 1 let warning = 2 let info = 3 let log = 4 let debug = 5 let to_int x = x end module CallBack = struct type t = { trace : string -> ?extra:string -> string -> unit ; message : lvl:Level.t -> message:string -> unit ; diagnostics : uri:Lang.LUri.File.t -> version:int -> Lang.Diagnostic.t list -> unit ; fileProgress : uri:Lang.LUri.File.t -> version:int -> Progress.Info.t list -> unit ; perfData : uri:Lang.LUri.File.t -> version:int -> Perf.t -> unit ; serverVersion : ServerInfo.Version.t -> unit ; serverStatus : ServerInfo.Status.t -> unit } let default = { trace = (fun _ ?extra:_ _ -> ()) ; message = (fun ~lvl:_ ~message:_ -> ()) ; diagnostics = (fun ~uri:_ ~version:_ _ -> ()) ; fileProgress = (fun ~uri:_ ~version:_ _ -> ()) ; perfData = (fun ~uri:_ ~version:_ _ -> ()) ; serverVersion = (fun _ -> ()) ; serverStatus = (fun _ -> ()) } let cb = ref default let set t = cb := t end module Log = struct let trace d ?extra m = !CallBack.cb.trace d ?extra m let feedback feedback = if not (CList.is_empty feedback) then (* Put feedbacks content here? *) let extra = None in !CallBack.cb.trace "feedback" ?extra "feedback received in non-user facing place" end module Report = struct let message ~io ~lvl ~message = io.CallBack.message ~lvl ~message let diagnostics ~io ~uri ~version d = io.CallBack.diagnostics ~uri ~version d let fileProgress ~io ~uri ~version d = io.CallBack.fileProgress ~uri ~version d let perfData ~io ~uri ~version pd = io.CallBack.perfData ~uri ~version pd let serverVersion ~io vi = io.CallBack.serverVersion vi let serverStatus ~io st = io.CallBack.serverStatus st end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>