Skip to content

Commit 956e205

Browse files
bors[bot]matklad
andauthored
Merge #9730
9730: minor: drop impl-specific stuff from lsp docs r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 8232804 + 68836c0 commit 956e205

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/dev/lsp-extensions.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ interface SsrParams {
275275
parseOnly: bool,
276276
/// The current text document. This and `position` will be used to determine in what scope
277277
/// paths in `query` should be resolved.
278-
textDocument: lc.TextDocumentIdentifier;
278+
textDocument: TextDocumentIdentifier;
279279
/// Position where SSR was invoked.
280-
position: lc.Position;
280+
position: Position;
281281
}
282282
```
283283

@@ -664,15 +664,15 @@ interface TestInfo {
664664

665665
**Experimental Server Capability:** { "hoverRange": boolean }
666666

667-
This request build upon the current `textDocument/hover` to show the type of the expression currently selected.
667+
This extension allows passing a `Range` as a `position` field of `HoverParams`.
668+
The primary use-case is to use the hover request to show the type of the expression currently selected.
668669

669670
```typescript
670-
interface HoverParams extends lc.WorkDoneProgressParams {
671-
textDocument: lc.TextDocumentIdentifier;
672-
position: lc.Range | lc.Position;
671+
interface HoverParams extends WorkDoneProgressParams {
672+
textDocument: TextDocumentIdentifier;
673+
position: Range | Position;
673674
}
674675
```
675-
676676
Whenever the client sends a `Range`, it is understood as the current selection and any hover included in the range will show the type of the expression if possible.
677677

678678
### Example
@@ -699,8 +699,8 @@ This request is sent from client to server to move item under cursor or selectio
699699

700700
```typescript
701701
export interface MoveItemParams {
702-
textDocument: lc.TextDocumentIdentifier,
703-
range: lc.Range,
702+
textDocument: TextDocumentIdentifier,
703+
range: Range,
704704
direction: Direction
705705
}
706706

0 commit comments

Comments
 (0)