volar-service-json
Advanced tools
Comparing version 0.0.34 to 0.0.35
@@ -1,2 +0,2 @@ | ||
import type { ServicePlugin, DocumentSelector, ServiceContext, Disposable, Result, FormattingOptions } from '@volar/language-service'; | ||
import type { LanguageServicePlugin, DocumentSelector, ServiceContext, Disposable, ProviderResult, FormattingOptions } from '@volar/language-service'; | ||
import * as json from 'vscode-json-languageservice'; | ||
@@ -17,8 +17,8 @@ import type { TextDocument } from 'vscode-languageserver-textdocument'; | ||
getWorkspaceContextService?(context: ServiceContext): json.WorkspaceContextService; | ||
isFormattingEnabled?(document: TextDocument, context: ServiceContext): Result<boolean>; | ||
getFormattingOptions?(document: TextDocument, options: FormattingOptions, context: ServiceContext): Result<json.FormattingOptions>; | ||
getLanguageSettings?(context: ServiceContext): Result<json.LanguageSettings>; | ||
getDocumentLanguageSettings?(document: TextDocument, context: ServiceContext): Result<json.DocumentLanguageSettings | undefined>; | ||
isFormattingEnabled?(document: TextDocument, context: ServiceContext): ProviderResult<boolean>; | ||
getFormattingOptions?(document: TextDocument, options: FormattingOptions, context: ServiceContext): ProviderResult<json.FormattingOptions>; | ||
getLanguageSettings?(context: ServiceContext): ProviderResult<json.LanguageSettings>; | ||
getDocumentLanguageSettings?(document: TextDocument, context: ServiceContext): ProviderResult<json.DocumentLanguageSettings | undefined>; | ||
onDidChangeLanguageSettings?(listener: () => void, context: ServiceContext): Disposable; | ||
}): ServicePlugin; | ||
}): LanguageServicePlugin; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -135,4 +135,5 @@ "use strict"; | ||
const jsonDocument = getJsonDocument(document); | ||
if (!jsonDocument) | ||
if (!jsonDocument) { | ||
return; | ||
} | ||
await (initializing ??= initialize()); | ||
@@ -139,0 +140,0 @@ return await callback(jsonDocument); |
{ | ||
"name": "volar-service-json", | ||
"version": "0.0.34", | ||
"version": "0.0.35", | ||
"description": "Integrate vscode-json-languageservice into Volar", | ||
@@ -34,3 +34,3 @@ "homepage": "https://github.com/volarjs/services/tree/master/packages/json", | ||
"peerDependencies": { | ||
"@volar/language-service": "~2.1.0" | ||
"@volar/language-service": "~2.2.0-alpha.0" | ||
}, | ||
@@ -42,3 +42,3 @@ "peerDependenciesMeta": { | ||
}, | ||
"gitHead": "aafefd1d65541462b3e99208f14dbb2cd8477ae9" | ||
"gitHead": "cbd8ef0ada6eae9656286535599c9b289134d1e3" | ||
} |
11876
193