Skip to content

Commit

Permalink
Add WindowClientCapabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Apr 10, 2019
1 parent fca3df0 commit 2853b6e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/progress.proposed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export class WindowProgressFeature implements StaticFeature {
constructor(private _client: BaseLanguageClient) {}

public fillClientCapabilities(capabilities: ClientCapabilities): void {
capabilities.experimental = capabilities.experimental || {};
capabilities.experimental = capabilities.window || {};
let windowProgressCapabilities = capabilities as Proposed.WindowProgressClientCapabilities;
windowProgressCapabilities.experimental.progress = true;
windowProgressCapabilities.window.progress = true;
}

public initialize(): void {
Expand Down
15 changes: 15 additions & 0 deletions protocol/src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,16 @@ export interface TextDocumentClientCapabilities {
};
}

/**
* Window specific client capabilities.
*/
export interface WindowClientCapabilities {
/**
* Whether client supports handling progress notifications.
*/
progress?: boolean;
}

/**
* Defines the capabilities provided by the client.
*/
Expand All @@ -664,6 +674,11 @@ export interface _ClientCapabilities {
*/
textDocument?: TextDocumentClientCapabilities;

/**
* Window specific client capabilities.
*/
window?: WindowClientCapabilities;

/**
* Experimental client capabilities.
*/
Expand Down

0 comments on commit 2853b6e

Please sign in to comment.