From 1487f6cf45baf983ac52362328077a5e7413c2f6 Mon Sep 17 00:00:00 2001 From: Heyward Fann Date: Wed, 12 May 2021 17:29:06 +0800 Subject: [PATCH] chore(language-client): format --- src/language-client/client.ts | 16 ++++++++-------- src/language-client/semanticTokens.ts | 14 +++++++------- src/semanticTokensBuilder.ts | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/language-client/client.ts b/src/language-client/client.ts index 0dd253bc294..96255aadd56 100644 --- a/src/language-client/client.ts +++ b/src/language-client/client.ts @@ -733,7 +733,7 @@ export interface LanguageClientOptions { workspaceFolder?: WorkspaceFolder connectionOptions?: ConnectionOptions markdown?: { - isTrusted?: boolean; + isTrusted?: boolean } } @@ -4091,12 +4091,12 @@ export abstract class BaseLanguageClient { public getFeature(request: typeof WillSaveTextDocumentWaitUntilRequest.method): DynamicFeature & NotificationFeature<(textDocument: TextDocument) => ProviderResult> public getFeature(request: typeof DidSaveTextDocumentNotification.method): DynamicFeature & NotificationFeature<(textDocument: TextDocument) => void> public getFeature(request: typeof DidCloseTextDocumentNotification.method): DynamicFeature & NotificationFeature<(textDocument: TextDocument) => void> - public getFeature(request: typeof DidCreateFilesNotification.method): DynamicFeature & { send: (event: FileCreateEvent) => Promise }; - public getFeature(request: typeof DidRenameFilesNotification.method): DynamicFeature & { send: (event: FileRenameEvent) => Promise }; - public getFeature(request: typeof DidDeleteFilesNotification.method): DynamicFeature & { send: (event: FileDeleteEvent) => Promise }; - public getFeature(request: typeof WillCreateFilesRequest.method): DynamicFeature & { send: (event: FileWillCreateEvent) => Promise }; - public getFeature(request: typeof WillRenameFilesRequest.method): DynamicFeature & { send: (event: FileWillRenameEvent) => Promise }; - public getFeature(request: typeof WillDeleteFilesRequest.method): DynamicFeature & { send: (event: FileWillDeleteEvent) => Promise }; + public getFeature(request: typeof DidCreateFilesNotification.method): DynamicFeature & { send: (event: FileCreateEvent) => Promise } + public getFeature(request: typeof DidRenameFilesNotification.method): DynamicFeature & { send: (event: FileRenameEvent) => Promise } + public getFeature(request: typeof DidDeleteFilesNotification.method): DynamicFeature & { send: (event: FileDeleteEvent) => Promise } + public getFeature(request: typeof WillCreateFilesRequest.method): DynamicFeature & { send: (event: FileWillCreateEvent) => Promise } + public getFeature(request: typeof WillRenameFilesRequest.method): DynamicFeature & { send: (event: FileWillRenameEvent) => Promise } + public getFeature(request: typeof WillDeleteFilesRequest.method): DynamicFeature & { send: (event: FileWillDeleteEvent) => Promise } public getFeature(request: typeof CompletionRequest.method): DynamicFeature & TextDocumentProviderFeature public getFeature(request: typeof HoverRequest.method): DynamicFeature & TextDocumentProviderFeature public getFeature(request: typeof SignatureHelpRequest.method): DynamicFeature & TextDocumentProviderFeature @@ -4297,7 +4297,7 @@ export abstract class BaseLanguageClient { if (error instanceof ResponseError) { if (error.code === LSPErrorCodes.RequestCancelled) { if (token !== undefined && token.isCancellationRequested) { - return defaultValue; + return defaultValue } // do not throw error } else if (error.code === LSPErrorCodes.ContentModified) { diff --git a/src/language-client/semanticTokens.ts b/src/language-client/semanticTokens.ts index fdc281e8b62..730ab100cc5 100644 --- a/src/language-client/semanticTokens.ts +++ b/src/language-client/semanticTokens.ts @@ -31,7 +31,7 @@ export interface DocumentSemanticsTokensEditsSignature { } export interface DocumentRangeSemanticTokensSignature { - (this: void, document: TextDocument, range: Range, token: CancellationToken): ProviderResult; + (this: void, document: TextDocument, range: Range, token: CancellationToken): ProviderResult } /** @@ -40,15 +40,15 @@ export interface DocumentRangeSemanticTokensSignature { * @since 3.16.0 */ export interface SemanticTokensMiddleware { - provideDocumentSemanticTokens?: (this: void, document: TextDocument, token: CancellationToken, next: DocumentSemanticsTokensSignature) => ProviderResult; - provideDocumentSemanticTokensEdits?: (this: void, document: TextDocument, previousResultId: string, token: CancellationToken, next: DocumentSemanticsTokensEditsSignature) => ProviderResult; - provideDocumentRangeSemanticTokens?: (this: void, document: TextDocument, range: Range, token: CancellationToken, next: DocumentRangeSemanticTokensSignature) => ProviderResult; + provideDocumentSemanticTokens?: (this: void, document: TextDocument, token: CancellationToken, next: DocumentSemanticsTokensSignature) => ProviderResult + provideDocumentSemanticTokensEdits?: (this: void, document: TextDocument, previousResultId: string, token: CancellationToken, next: DocumentSemanticsTokensEditsSignature) => ProviderResult + provideDocumentRangeSemanticTokens?: (this: void, document: TextDocument, range: Range, token: CancellationToken, next: DocumentRangeSemanticTokensSignature) => ProviderResult } export interface SemanticTokensProviders { - range?: DocumentRangeSemanticTokensProvider; - full?: DocumentSemanticTokensProvider; - onDidChangeSemanticTokensEmitter: Emitter; + range?: DocumentRangeSemanticTokensProvider + full?: DocumentSemanticTokensProvider + onDidChangeSemanticTokensEmitter: Emitter } export class SemanticTokensFeature extends TextDocumentFeature { diff --git a/src/semanticTokensBuilder.ts b/src/semanticTokensBuilder.ts index 1d552aff77b..e21bb3de40c 100644 --- a/src/semanticTokensBuilder.ts +++ b/src/semanticTokensBuilder.ts @@ -51,7 +51,7 @@ export class SemanticTokensBuilder { * @param tokenType The encoded token type. * @param tokenModifiers The encoded token modifiers. */ - public push(line: number, char: number, length: number, tokenType: number, tokenModifiers?: number): void; + public push(line: number, char: number, length: number, tokenType: number, tokenModifiers?: number): void /** * Add another token. Use only when providing a legend. * @@ -59,7 +59,7 @@ export class SemanticTokensBuilder { * @param tokenType The token type. * @param tokenModifiers The token modifiers. */ - public push(range: Range, tokenType: string, tokenModifiers?: string[]): void; + public push(range: Range, tokenType: string, tokenModifiers?: string[]): void public push(arg0: any, arg1: any, arg2: any, arg3?: any, arg4?: any): void { if (typeof arg0 === 'number' && typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'number' && (typeof arg4 === 'number' || typeof arg4 === 'undefined')) { if (typeof arg4 === 'undefined') {