@spyglassmc/language-server 0.4.9 → 0.4.11

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
@@ -41,10 +41,6 @@ connection.onInitialize(async (params) => {
41
41
  await new Promise((resolve) => setTimeout(resolve, 3000));
42
42
  logger.warn('Delayed 3 seconds manually. If you see this in production, it means SPGoding messed up.');
43
43
  }
44
- if (params.workDoneToken) {
45
- progressReporter = connection.window.attachWorkDoneProgress(params.workDoneToken);
46
- progressReporter.begin(locales.localize('server.progress.preparing.title'));
47
- }
48
44
  try {
49
45
  await locales.loadLocale(params.locale);
50
46
  }
@@ -66,7 +62,7 @@ connection.onInitialize(async (params) => {
66
62
  cacheRoot: fileUtil.ensureEndingSlash(url.pathToFileURL(cacheRoot).toString()),
67
63
  externals,
68
64
  initializers: [mcdoc.initialize, je.initialize],
69
- projectRoot: core.fileUtil.ensureEndingSlash(workspaceFolders[0].uri),
65
+ projectRoots: workspaceFolders.map(f => core.fileUtil.ensureEndingSlash(f.uri)),
70
66
  },
71
67
  });
72
68
  service.project.on('documentErrored', async ({ errors, uri, version }) => {
@@ -80,8 +76,8 @@ connection.onInitialize(async (params) => {
80
76
  catch (e) {
81
77
  console.error('[sendDiagnostics]', e);
82
78
  }
83
- }).on('ready', () => {
84
- progressReporter?.done();
79
+ }).on('ready', async () => {
80
+ await connection.sendProgress(ls.WorkDoneProgress.type, 'initialize', { kind: 'end' });
85
81
  });
86
82
  await service.project.init();
87
83
  }
package/lib/util/toLS.js CHANGED
@@ -125,6 +125,7 @@ export function completionItem(completion, doc, requestedOffset, insertReplaceSu
125
125
  const ans = {
126
126
  label: completion.label,
127
127
  kind: completion.kind,
128
+ ...(completion.labelSuffix ? { labelDetails: { detail: completion.labelSuffix } } : {}),
128
129
  detail: completion.detail,
129
130
  documentation: completion.documentation,
130
131
  filterText: completion.filterText,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spyglassmc/language-server",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
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.7",
25
- "@spyglassmc/java-edition": "0.3.10",
26
- "@spyglassmc/locales": "0.3.7",
27
- "@spyglassmc/mcdoc": "0.3.10"
24
+ "@spyglassmc/core": "0.4.9",
25
+ "@spyglassmc/java-edition": "0.3.12",
26
+ "@spyglassmc/locales": "0.3.8",
27
+ "@spyglassmc/mcdoc": "0.3.12"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"