@spyglassmc/nbt 0.3.19 → 0.3.21
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 +4 -1
- package/package.json +3 -3
package/lib/completer/index.js
CHANGED
|
@@ -32,6 +32,7 @@ const compound = core.completer.record({
|
|
|
32
32
|
.map(({ key, field }) => core.CompletionItem.create(key, pair?.key ?? range, {
|
|
33
33
|
kind: 5 /* core.CompletionKind.Field */,
|
|
34
34
|
detail: mcdoc.McdocType.toString(field.type),
|
|
35
|
+
documentation: field.desc,
|
|
35
36
|
deprecated: field.deprecated,
|
|
36
37
|
sortText: field.optional ? '$b' : '$a', // sort above hardcoded $schema
|
|
37
38
|
filterText: formatKey(key, pair?.key?.quote),
|
|
@@ -103,6 +104,7 @@ function getPathKeys(typeDef, range, quote, ctx) {
|
|
|
103
104
|
.map(({ key, field }) => core.CompletionItem.create(key, range, {
|
|
104
105
|
kind: 5 /* core.CompletionKind.Field */,
|
|
105
106
|
detail: mcdoc.McdocType.toString(field.type),
|
|
107
|
+
documentation: field.desc,
|
|
106
108
|
deprecated: field.deprecated,
|
|
107
109
|
sortText: field.optional ? '$b' : '$a', // sort above hardcoded $schema
|
|
108
110
|
filterText: formatKey(key, quote),
|
|
@@ -111,10 +113,11 @@ function getPathKeys(typeDef, range, quote, ctx) {
|
|
|
111
113
|
}
|
|
112
114
|
function getValues(typeDef, range, ctx) {
|
|
113
115
|
return mcdoc.runtime.completer.getValues(typeDef, ctx)
|
|
114
|
-
.map(({ value, labelSuffix, detail, kind, completionKind, insertText, sortText }) => core.CompletionItem.create(value, range, {
|
|
116
|
+
.map(({ value, labelSuffix, detail, documentation, kind, completionKind, insertText, sortText }) => core.CompletionItem.create(value, range, {
|
|
115
117
|
kind: completionKind ?? 12 /* core.CompletionKind.Value */,
|
|
116
118
|
labelSuffix,
|
|
117
119
|
detail,
|
|
120
|
+
documentation,
|
|
118
121
|
filterText: formatValue(value, kind),
|
|
119
122
|
insertText: formatValue(insertText ?? value, kind),
|
|
120
123
|
sortText,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/nbt",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
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.
|
|
28
|
+
"@spyglassmc/core": "0.4.17",
|
|
29
29
|
"@spyglassmc/locales": "0.3.10",
|
|
30
|
-
"@spyglassmc/mcdoc": "0.3.
|
|
30
|
+
"@spyglassmc/mcdoc": "0.3.21"
|
|
31
31
|
}
|
|
32
32
|
}
|