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.
- package/index.d.ts +1 -1
- package/index.js +18 -13
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
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({
|
|
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,
|
|
143
|
-
return
|
|
147
|
+
return worker(document, jsonDocument => {
|
|
148
|
+
return jsonLs.findLinks(document, jsonDocument);
|
|
144
149
|
});
|
|
145
150
|
},
|
|
146
151
|
provideDocumentSymbols(document) {
|
|
147
|
-
return worker(document,
|
|
148
|
-
return
|
|
152
|
+
return worker(document, jsonDocument => {
|
|
153
|
+
return jsonLs.findDocumentSymbols2(document, jsonDocument);
|
|
149
154
|
});
|
|
150
155
|
},
|
|
151
156
|
provideDocumentColors(document) {
|
|
152
|
-
return worker(document,
|
|
153
|
-
return
|
|
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,
|
|
158
|
-
return
|
|
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,
|
|
163
|
-
return
|
|
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,
|
|
168
|
-
return
|
|
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.
|
|
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": "
|
|
41
|
+
"gitHead": "7bf732781fe5900fbe0be87e993b5a74bc939aff"
|
|
42
42
|
}
|