volar-service-json 0.0.33 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +6 -6
- package/index.js +2 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LanguageServicePlugin, DocumentSelector, ServiceContext, Disposable, ProviderResult, FormattingOptions } from '@volar/language-service';
|
|
2
2
|
import * as json from 'vscode-json-languageservice';
|
|
3
3
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
4
4
|
export interface Provide {
|
|
@@ -14,10 +14,10 @@ export interface JSONSchemaSettings {
|
|
|
14
14
|
export declare function create({ documentSelector, getWorkspaceContextService, isFormattingEnabled, getFormattingOptions, getLanguageSettings, getDocumentLanguageSettings, onDidChangeLanguageSettings, }?: {
|
|
15
15
|
documentSelector?: DocumentSelector;
|
|
16
16
|
getWorkspaceContextService?(context: ServiceContext): json.WorkspaceContextService;
|
|
17
|
-
isFormattingEnabled?(document: TextDocument, context: ServiceContext):
|
|
18
|
-
getFormattingOptions?(document: TextDocument, options: FormattingOptions, context: ServiceContext):
|
|
19
|
-
getLanguageSettings?(context: ServiceContext):
|
|
20
|
-
getDocumentLanguageSettings?(document: TextDocument, context: ServiceContext):
|
|
17
|
+
isFormattingEnabled?(document: TextDocument, context: ServiceContext): ProviderResult<boolean>;
|
|
18
|
+
getFormattingOptions?(document: TextDocument, options: FormattingOptions, context: ServiceContext): ProviderResult<json.FormattingOptions>;
|
|
19
|
+
getLanguageSettings?(context: ServiceContext): ProviderResult<json.LanguageSettings>;
|
|
20
|
+
getDocumentLanguageSettings?(document: TextDocument, context: ServiceContext): ProviderResult<json.DocumentLanguageSettings | undefined>;
|
|
21
21
|
onDidChangeLanguageSettings?(listener: () => void, context: ServiceContext): Disposable;
|
|
22
|
-
}):
|
|
22
|
+
}): LanguageServicePlugin;
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -132,8 +132,9 @@ function create({ documentSelector = ['json', 'jsonc'], getWorkspaceContextServi
|
|
|
132
132
|
};
|
|
133
133
|
async function worker(document, callback) {
|
|
134
134
|
const jsonDocument = getJsonDocument(document);
|
|
135
|
-
if (!jsonDocument)
|
|
135
|
+
if (!jsonDocument) {
|
|
136
136
|
return;
|
|
137
|
+
}
|
|
137
138
|
await (initializing ??= initialize());
|
|
138
139
|
return await callback(jsonDocument);
|
|
139
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "volar-service-json",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"description": "Integrate vscode-json-languageservice into Volar",
|
|
5
5
|
"homepage": "https://github.com/volarjs/services/tree/master/packages/json",
|
|
6
6
|
"bugs": "https://github.com/volarjs/services/issues",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"vscode-languageserver-textdocument": "^1.0.11"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@volar/language-service": "~2.
|
|
34
|
+
"@volar/language-service": "~2.2.0-alpha.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@volar/language-service": {
|
|
38
38
|
"optional": true
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "cbd8ef0ada6eae9656286535599c9b289134d1e3"
|
|
42
42
|
}
|