@void2610/tyranoscript-lsp 0.2.0 → 0.3.0

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.
Files changed (2) hide show
  1. package/dist/server.js +13 -3
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -12230,10 +12230,20 @@ var WorkspaceScanner = class {
12230
12230
  }
12231
12231
  const macroMatch = line.match(/\[macro\s+name\s*=\s*"(\w+)"\s*\]/i);
12232
12232
  if (macroMatch) {
12233
+ const commentLines = [];
12234
+ for (let j = i - 1; j >= 0; j--) {
12235
+ const commentMatch = lines[j].match(/^;\s?(.*)/);
12236
+ if (commentMatch) {
12237
+ commentLines.unshift(commentMatch[1]);
12238
+ } else {
12239
+ break;
12240
+ }
12241
+ }
12233
12242
  macros.push({
12234
12243
  name: macroMatch[1],
12235
12244
  file: relativePath,
12236
- line: i
12245
+ line: i,
12246
+ description: commentLines.join("\n")
12237
12247
  });
12238
12248
  }
12239
12249
  }
@@ -12458,12 +12468,12 @@ function createMacroCompletions(trigger) {
12458
12468
  return {
12459
12469
  label: macro.name,
12460
12470
  kind: import_node.CompletionItemKind.Function,
12461
- detail: `\u30DE\u30AF\u30ED (${macro.file})`,
12471
+ detail: macro.description ? macro.description.split("\n")[0] : `\u30DE\u30AF\u30ED (${macro.file})`,
12462
12472
  documentation: {
12463
12473
  kind: import_node.MarkupKind.Markdown,
12464
12474
  value: `**[${macro.name}]** \u2014 \u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30DE\u30AF\u30ED
12465
12475
 
12466
- \u5B9A\u7FA9\u5143: \`${macro.file}\` (\u884C ${macro.line + 1})`
12476
+ ${macro.description ? macro.description + "\n\n" : ""}\u5B9A\u7FA9\u5143: \`${macro.file}\` (\u884C ${macro.line + 1})`
12467
12477
  },
12468
12478
  insertText,
12469
12479
  insertTextFormat: import_node.InsertTextFormat.PlainText,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@void2610/tyranoscript-lsp",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "TyranoScript Language Server for Zed",
5
5
  "main": "dist/server.js",
6
6
  "files": [