microsoft/language-server-protocol

A request for looking up documentation

Open

#634 geöffnet am 9. Dez. 2018

Auf GitHub ansehen
 (7 Kommentare) (8 Reaktionen) (0 zugewiesene Personen)HTML (956 Forks)batch import
feature-requesthelp wantednew request

Repository-Metriken

Stars
 (12.810 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19h 29m) (12 gemergte PRs in 30 T)

Beschreibung

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