123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263(************************************************************************)(* 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 *)(************************************************************************)openPetanque_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