@spyglassmc/json 0.3.17 → 0.3.19
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/lib/completer/index.js +3 -1
- package/package.json +4 -4
package/lib/completer/index.js
CHANGED
|
@@ -29,6 +29,7 @@ const object = core.completer.record({
|
|
|
29
29
|
.map(({ key, field }) => core.CompletionItem.create(key, pair?.key ?? range, {
|
|
30
30
|
kind: 5 /* core.CompletionKind.Field */,
|
|
31
31
|
detail: mcdoc.McdocType.toString(field.type),
|
|
32
|
+
documentation: field.desc,
|
|
32
33
|
deprecated: field.deprecated,
|
|
33
34
|
sortText: field.optional ? '$b' : '$a', // sort above hardcoded $schema
|
|
34
35
|
filterText: `"${key}"`,
|
|
@@ -66,10 +67,11 @@ const primitive = (node, ctx) => {
|
|
|
66
67
|
};
|
|
67
68
|
function getValues(typeDef, range, ctx) {
|
|
68
69
|
return mcdoc.runtime.completer.getValues(typeDef, ctx)
|
|
69
|
-
.map(({ value, labelSuffix, detail, kind, completionKind, insertText, sortText }) => core.CompletionItem.create(value, range, {
|
|
70
|
+
.map(({ value, labelSuffix, detail, documentation, kind, completionKind, insertText, sortText }) => core.CompletionItem.create(value, range, {
|
|
70
71
|
kind: completionKind ?? 12 /* core.CompletionKind.Value */,
|
|
71
72
|
labelSuffix,
|
|
72
73
|
detail,
|
|
74
|
+
documentation,
|
|
73
75
|
filterText: kind === 'string' ? `"${value}"` : value,
|
|
74
76
|
insertText: kind === 'string' ? `"${insertText ?? value}"` : insertText ?? value,
|
|
75
77
|
sortText,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/json",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/SpyglassMC/Spyglass/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@spyglassmc/core": "0.4.
|
|
29
|
-
"@spyglassmc/locales": "0.3.
|
|
30
|
-
"@spyglassmc/mcdoc": "0.3.
|
|
28
|
+
"@spyglassmc/core": "0.4.16",
|
|
29
|
+
"@spyglassmc/locales": "0.3.10",
|
|
30
|
+
"@spyglassmc/mcdoc": "0.3.20"
|
|
31
31
|
}
|
|
32
32
|
}
|