Hover Feature
Opened this issue · 0 comments
DotJoshJohnson commented
Hover
The hover request is sent from the client to the server to request hover information at a given text document position.
Changed:: in 2.0 the requests uses TextDocumentPositionParams with a proper textDocument and position property. In 1.0 the uri of the referenced text document was inlined into the params object.
Request
- method: 'textDocument/hover'
- param:
TextDocumentPositionParams
Response
- result:
Hover
defined as follows:
/**
* The result of a hove request.
*/
interface Hover {
/**
* The hover's content
*/
contents: MarkedString | MarkedString[];
/**
* An optional range
*/
range?: Range;
}
Where MarkedString
is defined as follows:
type MarkedString = string | { language: string; value: string };
- error: code and message set in case an exception happens during the hover request.