Skip to content

Commit 88ca0c6

Browse files
committed
Re-add documentation for textDocumentContent request
Since we 'vendor' it as an LSP extension for now, we'll document it here until it is fully upstreamed to LSP 3.18.
1 parent 6ca4d95 commit 88ca0c6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Contributor Documentation/LSP Extensions.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,3 +595,30 @@ export interface PeekDocumentsResult {
595595
success: boolean;
596596
}
597597
```
598+
599+
## `workspace/textDocumentContent`
600+
601+
Request from the client to the server asking for contents of a URI having a custom scheme.
602+
For example: "sourcekit-lsp:"
603+
604+
Enable the experimental client capability `"workspace/textDocumentContent"` so that the server responds with reference document URLs for certain requests or commands whenever possible.
605+
606+
- params: `TextDocumentContentParams`
607+
608+
- result: `TextDocumentContentResponse`
609+
610+
```ts
611+
export interface TextDocumentContentParams {
612+
/**
613+
* The `DocumentUri` of the custom scheme url for which content is required
614+
*/
615+
uri: DocumentUri;
616+
}
617+
618+
/**
619+
* Response containing the content of the requested document
620+
*/
621+
export interface TextDocumentContentResult {
622+
text: string;
623+
}
624+
```

0 commit comments

Comments
 (0)