Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Documentation for lean --server #1996

Open
1 task done
whitequark opened this issue Mar 28, 2019 · 4 comments
Open
1 task done

Documentation for lean --server #1996

whitequark opened this issue Mar 28, 2019 · 4 comments

Comments

@whitequark
Copy link

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.

Description

Is there any documentation for lean --server? I want to implement a Lean mode for Sublime Text (similar to my Coq mode) but I wasn't able to find any documentation for the server protocol. I looked at the source code but I don't really understand it just from that. A high-level introduction would be appreciated.

@cipher1024
Copy link
Contributor

Development of Lean 3 has stopped as the developers focus on Lean 4. You can post your issue on the community fork of Lean instead: https://github.com/leanprover-community/lean/issues. But the short answer may be that you'll have to write that documentation yourself as you discover how it works.

@Kha
Copy link
Member

Kha commented Mar 28, 2019

Yes, the server mode is sorely lacking documentation because most clients so far have been written by core developers. The lean-client-js server API should at least be much more readable than the C++ code. There's also an LSP implementation in that repo, which AFAIK is used by the vim client (but not by the VS Code extension).

In general, most requests should be relatively self-explanatory, perhaps with the exception of the roi request. This "range of interest" determines what parts of a file should be processed; for parts outside the ROI, neither informational nor error messages will be reported. At least in Emacs, the entire client-server communication can also be inspected by lean-turn-on-debug-mode.

@PatrickMassot
Copy link

Other sources of information:

@whitequark
Copy link
Author

Thanks everyone!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants