mirror of
https://github.com/microsoft/language-server-protocol.git
synced 2025-12-23 08:48:16 +00:00
This commit is contained in:
parent
302efc0ff0
commit
7daee688bf
1 changed files with 13 additions and 2 deletions
15
protocol.md
15
protocol.md
|
|
@ -1069,7 +1069,7 @@ _Response_
|
|||
* result: `Hover` defined as follows:
|
||||
```typescript
|
||||
/**
|
||||
* The result of a hove request.
|
||||
* The result of a hover request.
|
||||
*/
|
||||
interface Hover {
|
||||
/**
|
||||
|
|
@ -1078,13 +1078,24 @@ interface Hover {
|
|||
contents: MarkedString | MarkedString[];
|
||||
|
||||
/**
|
||||
* An optional range
|
||||
* An optional range is a range inside a text document
|
||||
* that is used to visualize a hover, e.g. by changing the background color.
|
||||
*/
|
||||
range?: Range;
|
||||
}
|
||||
```
|
||||
Where `MarkedString` is defined as follows:
|
||||
```typescript
|
||||
/**
|
||||
* The marked string is rendered:
|
||||
* - as markdown if it is represented as a string
|
||||
* - as code block of the given langauge if it is represented as a pair of a language and a value
|
||||
*
|
||||
* The pair of a language and a value is an equivalent to markdown:
|
||||
* ```${language}
|
||||
* ${value}
|
||||
* ```
|
||||
*/
|
||||
type MarkedString = string | { language: string; value: string };
|
||||
```
|
||||
* error: code and message set in case an exception happens during the hover request.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue