volar-service-json 0.0.65 → 0.0.67

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.
Files changed (3) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +18 -13
  3. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { LanguageServicePlugin, DocumentSelector, LanguageServiceContext, Disposable, ProviderResult, FormattingOptions } from '@volar/language-service';
1
+ import type { Disposable, DocumentSelector, FormattingOptions, LanguageServiceContext, LanguageServicePlugin, ProviderResult } from '@volar/language-service';
2
2
  import * as json from 'vscode-json-languageservice';
3
3
  import type { TextDocument } from 'vscode-languageserver-textdocument';
4
4
  import { URI } from 'vscode-uri';
package/index.js CHANGED
@@ -60,7 +60,12 @@ function create({ documentSelector = ['json', 'jsonc'], getWorkspaceContextServi
60
60
  uri = schema.schema.id || `vscode://schemas/custom/${i}`;
61
61
  }
62
62
  if (uri) {
63
- languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema, folderUri: schema.folderUri });
63
+ languageSettings.schemas.push({
64
+ uri,
65
+ fileMatch: schema.fileMatch,
66
+ schema: schema.schema,
67
+ folderUri: schema.folderUri,
68
+ });
64
69
  }
65
70
  }
66
71
  return languageSettings;
@@ -139,33 +144,33 @@ function create({ documentSelector = ['json', 'jsonc'], getWorkspaceContextServi
139
144
  });
140
145
  },
141
146
  provideDocumentLinks(document) {
142
- return worker(document, async (jsonDocument) => {
143
- return await jsonLs.findLinks(document, jsonDocument);
147
+ return worker(document, jsonDocument => {
148
+ return jsonLs.findLinks(document, jsonDocument);
144
149
  });
145
150
  },
146
151
  provideDocumentSymbols(document) {
147
- return worker(document, async (jsonDocument) => {
148
- return await jsonLs.findDocumentSymbols2(document, jsonDocument);
152
+ return worker(document, jsonDocument => {
153
+ return jsonLs.findDocumentSymbols2(document, jsonDocument);
149
154
  });
150
155
  },
151
156
  provideDocumentColors(document) {
152
- return worker(document, async (jsonDocument) => {
153
- return await jsonLs.findDocumentColors(document, jsonDocument);
157
+ return worker(document, jsonDocument => {
158
+ return jsonLs.findDocumentColors(document, jsonDocument);
154
159
  });
155
160
  },
156
161
  provideColorPresentations(document, color, range) {
157
- return worker(document, async (jsonDocument) => {
158
- return await jsonLs.getColorPresentations(document, jsonDocument, color, range);
162
+ return worker(document, jsonDocument => {
163
+ return jsonLs.getColorPresentations(document, jsonDocument, color, range);
159
164
  });
160
165
  },
161
166
  provideFoldingRanges(document) {
162
- return worker(document, async () => {
163
- return await jsonLs.getFoldingRanges(document, context.env.clientCapabilities?.textDocument?.foldingRange);
167
+ return worker(document, () => {
168
+ return jsonLs.getFoldingRanges(document, context.env.clientCapabilities?.textDocument?.foldingRange);
164
169
  });
165
170
  },
166
171
  provideSelectionRanges(document, positions) {
167
- return worker(document, async (jsonDocument) => {
168
- return await jsonLs.getSelectionRanges(document, positions, jsonDocument);
172
+ return worker(document, jsonDocument => {
173
+ return jsonLs.getSelectionRanges(document, positions, jsonDocument);
169
174
  });
170
175
  },
171
176
  provideDocumentFormattingEdits(document, range, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volar-service-json",
3
- "version": "0.0.65",
3
+ "version": "0.0.67",
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",
@@ -38,5 +38,5 @@
38
38
  "optional": true
39
39
  }
40
40
  },
41
- "gitHead": "f0253f4f3e3b0b0f1a453f99b354eb9feaec38cd"
41
+ "gitHead": "7bf732781fe5900fbe0be87e993b5a74bc939aff"
42
42
  }