12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364(************************************************************************)(* Flèche => RL agent: petanque *)(* Copyright 2019 MINES ParisTech -- Dual License LGPL 2.1 / GPL3+ *)(* Copyright 2019-2024 Inria -- Dual License LGPL 2.1 / GPL3+ *)(* Written by: Emilio J. Gallego Arias & coq-lsp contributors *)(************************************************************************)moduleLsp=Fleche_lspopenPetanque_json(** [set_workspace { debug; root }] sets the current workspace to the directory
specified in [root] *)moduleSetWorkspace=structletmethod_="petanque/setWorkspace"moduleParams=structtypet={debug:bool;root:Lsp.JLang.LUri.File.t}[@@derivingyojson]endmoduleResponse=structtypet=unit[@@derivingyojson]endmoduleHandler=structmoduleParams=ParamsmoduleResponse=Responselethandler=Protocol.HType.Immediate(fun~token{Params.debug;root}->Shell.set_workspace~token~debug~root)endend(** [toc { uri } ] returns the table of contents for a document; the semantics
are quite Coq-specific, in particular, each sentence of the document can
contribute *)moduleTableOfContents=structletmethod_="petanque/toc"moduleParams=structtypet={uri:Lsp.JLang.LUri.File.t}[@@derivingyojson]endmoduleResponse=structtypet=(string*Lsp.JLang.Ast.Info.tlistoption)list[@@derivingyojson]endmoduleHandler=structmoduleParams=ParamsmoduleResponse=Responselethandler=Protocol.HType.FullDoc{uri_fn=(fun{Params.uri}->uri);handler=(fun~token~doc_->Shell.get_toc~token~doc)}endend