Skip to content

Commit 333b2d9

Browse files
committed
Added Documentation
1 parent f05fb57 commit 333b2d9

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

src/sourcekit-lsp/LanguageClientManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export class LanguageClientManager {
561561
},
562562
errorHandler: new SourceKitLSPErrorHandler(5),
563563
initializationOptions: {
564-
peekDocuments: true,
564+
peekDocuments: true, // client capability to handle `PeekDocumentsRequest`
565565
},
566566
};
567567

src/sourcekit-lsp/lspExtensions.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,45 @@ import { Position, Uri } from "vscode";
1818

1919
// Definitions for non-standard requests used by sourcekit-lsp
2020

21+
// Peek Documents
2122
export interface PeekDocumentsParams {
23+
/**
24+
* The `Uri` of the text document in which to show the "peeked" editor
25+
* (default: current document in the active editor)
26+
*/
2227
uri?: Uri;
28+
29+
/**
30+
* The position in the given text document in which to show the
31+
* "peeked editor" (default: current cursor position in the active editor)
32+
*/
2333
position?: Position;
34+
35+
/**
36+
* An array `Uri` of the documents to appear inside the "peeked" editor
37+
*/
2438
locations: Uri[];
39+
40+
/**
41+
* Presentation strategy when having multiple locations (default: "peek")
42+
*/
2543
multiple: string;
2644
}
2745

46+
/**
47+
* Response to indicate the `success` of the `PeekDocumentsRequest`
48+
*/
2849
export interface PeekDocumentsResult {
2950
success: boolean;
3051
}
3152

53+
/**
54+
* Request from the server to the client to show the given documents in a "peeked" editor.
55+
*
56+
* This request is handled by the client to show the given documents in a "peeked" editor (i.e. inline with / inside the editor canvas).
57+
*
58+
* It requires the experimental client capability `"peekDocuments"` to use.
59+
*/
3260
export const PeekDocumentsRequest = new langclient.RequestType<
3361
PeekDocumentsParams,
3462
PeekDocumentsResult,

0 commit comments

Comments
 (0)