microsoft / microsoft/language-server-protocol
A request for looking up documentation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
Is there a way to request documentation for something defined in Language Server Protocol? What I'm looking for is something like this.
def foo():
# Imagine your cursor is on `bar` here,
# and you can request documentation for it.
bar()
I'd like to essentially send a request to look up documentation, and get the documentation text back in a response, such as a docstring for a Python function, or jsdoc text for TypeScript, etc. Currently you can make a "hover" request, but the "hover" request appears to be intended for returning only brief information for a given cursor position, such as short description of a function's signature and a brief summary. It would be nice to be able to separately request full documentation for anything at your cursor.
tsserver does appear to offer full documentation for in its quickinfo request, which is roughly equivalent to hover. https://github.com/Microsoft/TypeScript/blob/master/lib/protocol.d.ts#L1253
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the LSP hover request with TypeScript's tsserver quickinfo, using the linked protocol.d.ts entry as the concrete reference. Define how a separate documentation lookup request would work for examples such as Python docstrings and TypeScript JSDoc, and consider the response needed to return full documentation text. Done means the protocol proposal is specified clearly enough for language servers and clients to implement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- api, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100