@spyglassmc/language-server 0.4.12 → 0.4.14

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/server.js CHANGED
@@ -59,6 +59,9 @@ connection.onInitialize(async (params) => {
59
59
  'project#ready#bind',
60
60
  ]),
61
61
  project: {
62
+ defaultConfig: core.ConfigService.merge(core.VanillaConfig, {
63
+ env: { gameVersion: initializationOptions?.gameVersion },
64
+ }),
62
65
  cacheRoot: fileUtil.ensureEndingSlash(url.pathToFileURL(cacheRoot).toString()),
63
66
  externals,
64
67
  initializers: [mcdoc.initialize, je.initialize],
package/lib/util/toLS.js CHANGED
@@ -25,7 +25,7 @@ export function colorPresentationArray(presentation, doc) {
25
25
  return presentation.map((p) => colorPresentation(p, doc));
26
26
  }
27
27
  export function diagnostic(error) {
28
- const ans = ls.Diagnostic.create(error.posRange, error.message, diagnosticSeverity(error.severity), undefined, 'spyglassmc');
28
+ const ans = ls.Diagnostic.create(error.posRange, error.message, diagnosticSeverity(error.severity), undefined, error.source ? `spyglassmc(${error.source})` : 'spyglassmc');
29
29
  if (error.info?.deprecated) {
30
30
  ;
31
31
  (ans.tags ??= [])?.push(ls.DiagnosticTag.Deprecated);
@@ -1,5 +1,6 @@
1
1
  export interface CustomInitializationOptions {
2
2
  inDevelopmentMode?: boolean;
3
+ gameVersion?: string;
3
4
  }
4
5
  export interface CustomServerCapabilities {
5
6
  dataHackPubify?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spyglassmc/language-server",
3
- "version": "0.4.12",
3
+ "version": "0.4.14",
4
4
  "type": "module",
5
5
  "main": "lib/server.js",
6
6
  "types": "lib/server.d.ts",
@@ -21,10 +21,10 @@
21
21
  "env-paths": "^2.2.1",
22
22
  "vscode-languageserver": "^9.0.1",
23
23
  "vscode-languageserver-textdocument": "^1.0.11",
24
- "@spyglassmc/core": "0.4.10",
25
- "@spyglassmc/java-edition": "0.3.13",
24
+ "@spyglassmc/core": "0.4.12",
25
+ "@spyglassmc/java-edition": "0.3.15",
26
26
  "@spyglassmc/locales": "0.3.8",
27
- "@spyglassmc/mcdoc": "0.3.13"
27
+ "@spyglassmc/mcdoc": "0.3.15"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"