diff --git a/src/jsonContributions.ts b/src/jsonContributions.ts index ac70b942..e7ef897b 100644 --- a/src/jsonContributions.ts +++ b/src/jsonContributions.ts @@ -2,10 +2,10 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Thenable, MarkedString, CompletionItem } from './jsonLanguageService'; +import { Thenable, MarkedString, CompletionItem, ASTNode } from './jsonLanguageService'; export interface JSONWorkerContribution { - getInfoContribution(uri: string, location: JSONPath): Thenable; + getInfoContribution(uri: string, location: JSONPath, node: ASTNode): undefined | Thenable; collectPropertyCompletions(uri: string, location: JSONPath, currentWord: string, addValue: boolean, isLast: boolean, result: CompletionsCollector): Thenable; collectValueCompletions(uri: string, location: JSONPath, propertyKey: string, result: CompletionsCollector): Thenable; collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable; diff --git a/src/services/jsonHover.ts b/src/services/jsonHover.ts index e68f945b..cc26440f 100644 --- a/src/services/jsonHover.ts +++ b/src/services/jsonHover.ts @@ -53,7 +53,7 @@ export class JSONHover { const location = Parser.getNodePath(node); for (let i = this.contributions.length - 1; i >= 0; i--) { const contribution = this.contributions[i]; - const promise = contribution.getInfoContribution(document.uri, location); + const promise = contribution.getInfoContribution(document.uri, location, node); if (promise) { return promise.then(htmlContent => createHover(htmlContent)); }