leanprover / leanprover/reference-manual

Document Lean's Language Server Functionalities

Open
#255 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

doc-request
Dominant language
Lean
Stars
129
Forks
67
Avg merge
1d 15h
Merged PRs (30d)
16

Description

What question should the reference manual answer?: The language server protocol is language-agnostic of course, which means each language gets to in some way "plug in" to the hooks that are offered. This means in particular that it's useful to know what functionality is implemented by a language server, and how it relates to the language. In particular, a specific question might be "what semantic tokens are sent back by the semantic highlighting support in Lean, and how do they relate to Lean's syntax categories".

Please describe what the reference manual should enable you to do that you can't do right now

Here are some sample questions that might be useful to answer (though maybe the "how" is more suited for tutorials and just the "which" are suitable for here...):

  • of the non-"universal" LSP methods, which additional optional ones does the LS implement in Lean?
  • How does completion work (which responses are returned), how does semantic highlighting work (which tokens are emitted)
  • What code actions are defined, and how are new ones registered?
  • what is Lean's RPC framework, and what additional functionality does it layer on? What API exists for adding or interacting with RPC methods?

Additional context
Some prior art is already in the docs clearly. E.g. https://lean-lang.org/lean4/doc/semantic_highlighting.html?highlight=semantic#semantic-highlighting exists for some of the semantic highlighting questions above

https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/Discussion.20thread.20for.20Lean.20Language.20Reference/near/494413278

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing semantic highlighting documentation and the issue's questions about LSP methods, completion, code actions, semantic tokens, and RPC. Define the reference-manual scope with the project before writing; done means the selected Lean language-server functionality and its relationship to Lean are documented clearly.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.