@nowline/lsp 0.4.1
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/LICENSE +190 -0
- package/README.md +49 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/nowline-lsp-module.d.ts +29 -0
- package/dist/nowline-lsp-module.d.ts.map +1 -0
- package/dist/nowline-lsp-module.js +49 -0
- package/dist/nowline-lsp-module.js.map +1 -0
- package/dist/providers/completion.d.ts +28 -0
- package/dist/providers/completion.d.ts.map +1 -0
- package/dist/providers/completion.js +175 -0
- package/dist/providers/completion.js.map +1 -0
- package/dist/providers/definition.d.ts +18 -0
- package/dist/providers/definition.d.ts.map +1 -0
- package/dist/providers/definition.js +39 -0
- package/dist/providers/definition.js.map +1 -0
- package/dist/providers/document-symbols.d.ts +24 -0
- package/dist/providers/document-symbols.d.ts.map +1 -0
- package/dist/providers/document-symbols.js +126 -0
- package/dist/providers/document-symbols.js.map +1 -0
- package/dist/providers/hover.d.ts +18 -0
- package/dist/providers/hover.d.ts.map +1 -0
- package/dist/providers/hover.js +78 -0
- package/dist/providers/hover.js.map +1 -0
- package/dist/providers/references.d.ts +19 -0
- package/dist/providers/references.d.ts.map +1 -0
- package/dist/providers/references.js +70 -0
- package/dist/providers/references.js.map +1 -0
- package/dist/providers/rename.d.ts +16 -0
- package/dist/providers/rename.d.ts.map +1 -0
- package/dist/providers/rename.js +72 -0
- package/dist/providers/rename.js.map +1 -0
- package/dist/references/ast-utils.d.ts +126 -0
- package/dist/references/ast-utils.d.ts.map +1 -0
- package/dist/references/ast-utils.js +313 -0
- package/dist/references/ast-utils.js.map +1 -0
- package/dist/server.d.ts +9 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +35 -0
- package/dist/server.js.map +1 -0
- package/package.json +47 -0
- package/src/index.ts +26 -0
- package/src/nowline-lsp-module.ts +102 -0
- package/src/providers/completion.ts +202 -0
- package/src/providers/definition.ts +58 -0
- package/src/providers/document-symbols.ts +152 -0
- package/src/providers/hover.ts +98 -0
- package/src/providers/references.ts +86 -0
- package/src/providers/rename.ts +109 -0
- package/src/references/ast-utils.ts +378 -0
- package/src/server.ts +33 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { LangiumDocument, MaybePromise } from 'langium';
|
|
2
|
+
import type { DocumentSymbolProvider } from 'langium/lsp';
|
|
3
|
+
import type { CancellationToken, DocumentSymbol, DocumentSymbolParams } from 'vscode-languageserver';
|
|
4
|
+
import type { NowlineLspServices } from '../nowline-lsp-module.js';
|
|
5
|
+
/**
|
|
6
|
+
* Outline view: roadmap → swimlanes → items, with parallel/group nesting and
|
|
7
|
+
* top-level anchors / milestones / footnotes / people / teams / labels /
|
|
8
|
+
* sizes / statuses surfaced as siblings of the swimlanes. Mirrors the layout
|
|
9
|
+
* engine's traversal so what authors see in the outline matches what gets
|
|
10
|
+
* rendered.
|
|
11
|
+
*/
|
|
12
|
+
export declare class NowlineDocumentSymbolProvider implements DocumentSymbolProvider {
|
|
13
|
+
constructor(_services: NowlineLspServices);
|
|
14
|
+
getSymbols(document: LangiumDocument, _params: DocumentSymbolParams, _cancelToken?: CancellationToken): MaybePromise<DocumentSymbol[]>;
|
|
15
|
+
private roadmapSymbol;
|
|
16
|
+
private entrySymbol;
|
|
17
|
+
private swimlaneSymbol;
|
|
18
|
+
private trackChildSymbol;
|
|
19
|
+
private itemSymbol;
|
|
20
|
+
private parallelSymbol;
|
|
21
|
+
private groupSymbol;
|
|
22
|
+
private simpleSymbol;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=document-symbols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-symbols.d.ts","sourceRoot":"","sources":["../../src/providers/document-symbols.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAW,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EACR,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EAEvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnE;;;;;;GAMG;AACH,qBAAa,6BAA8B,YAAW,sBAAsB;gBAC5D,SAAS,EAAE,kBAAkB;IAIzC,UAAU,CACN,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,EAC7B,YAAY,CAAC,EAAE,iBAAiB,GACjC,YAAY,CAAC,cAAc,EAAE,CAAC;IAqBjC,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,YAAY;CAkBvB"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { isAnchorDeclaration, isFootnoteDeclaration, isGroupBlock, isItemDeclaration, isLabelDeclaration, isMilestoneDeclaration, isParallelBlock, isPersonDeclaration, isSizeDeclaration, isStatusDeclaration, isSwimlaneDeclaration, isTeamDeclaration, } from '@nowline/core';
|
|
2
|
+
import { SymbolKind } from 'vscode-languageserver';
|
|
3
|
+
import { entityKind, fileFromDocument, nameRangeOf } from '../references/ast-utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* Outline view: roadmap → swimlanes → items, with parallel/group nesting and
|
|
6
|
+
* top-level anchors / milestones / footnotes / people / teams / labels /
|
|
7
|
+
* sizes / statuses surfaced as siblings of the swimlanes. Mirrors the layout
|
|
8
|
+
* engine's traversal so what authors see in the outline matches what gets
|
|
9
|
+
* rendered.
|
|
10
|
+
*/
|
|
11
|
+
export class NowlineDocumentSymbolProvider {
|
|
12
|
+
constructor(_services) {
|
|
13
|
+
/* AST helpers are pure. */
|
|
14
|
+
}
|
|
15
|
+
getSymbols(document, _params, _cancelToken) {
|
|
16
|
+
const file = fileFromDocument(document);
|
|
17
|
+
if (!file)
|
|
18
|
+
return [];
|
|
19
|
+
const symbols = [];
|
|
20
|
+
if (file.roadmapDecl) {
|
|
21
|
+
const roadmapSymbol = this.roadmapSymbol(file.roadmapDecl);
|
|
22
|
+
for (const entry of file.roadmapEntries) {
|
|
23
|
+
const child = this.entrySymbol(entry);
|
|
24
|
+
if (child)
|
|
25
|
+
roadmapSymbol.children.push(child);
|
|
26
|
+
}
|
|
27
|
+
symbols.push(roadmapSymbol);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
for (const entry of file.roadmapEntries) {
|
|
31
|
+
const child = this.entrySymbol(entry);
|
|
32
|
+
if (child)
|
|
33
|
+
symbols.push(child);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return symbols;
|
|
37
|
+
}
|
|
38
|
+
roadmapSymbol(roadmap) {
|
|
39
|
+
const range = roadmap.$cstNode.range;
|
|
40
|
+
const nameRange = nameRangeOf(roadmap) ?? range;
|
|
41
|
+
return {
|
|
42
|
+
name: roadmap.name ?? roadmap.title ?? 'roadmap',
|
|
43
|
+
detail: roadmap.title && roadmap.name ? roadmap.title : 'roadmap',
|
|
44
|
+
kind: SymbolKind.Package,
|
|
45
|
+
range,
|
|
46
|
+
selectionRange: nameRange,
|
|
47
|
+
children: [],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
entrySymbol(entry) {
|
|
51
|
+
if (isSwimlaneDeclaration(entry))
|
|
52
|
+
return this.swimlaneSymbol(entry);
|
|
53
|
+
if (isAnchorDeclaration(entry))
|
|
54
|
+
return this.simpleSymbol(entry, SymbolKind.Event);
|
|
55
|
+
if (isMilestoneDeclaration(entry))
|
|
56
|
+
return this.simpleSymbol(entry, SymbolKind.Event);
|
|
57
|
+
if (isFootnoteDeclaration(entry))
|
|
58
|
+
return this.simpleSymbol(entry, SymbolKind.String);
|
|
59
|
+
if (isPersonDeclaration(entry))
|
|
60
|
+
return this.simpleSymbol(entry, SymbolKind.Constant);
|
|
61
|
+
if (isTeamDeclaration(entry))
|
|
62
|
+
return this.simpleSymbol(entry, SymbolKind.Module);
|
|
63
|
+
if (isLabelDeclaration(entry))
|
|
64
|
+
return this.simpleSymbol(entry, SymbolKind.EnumMember);
|
|
65
|
+
if (isSizeDeclaration(entry))
|
|
66
|
+
return this.simpleSymbol(entry, SymbolKind.Number);
|
|
67
|
+
if (isStatusDeclaration(entry))
|
|
68
|
+
return this.simpleSymbol(entry, SymbolKind.Enum);
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
swimlaneSymbol(lane) {
|
|
72
|
+
const sym = this.simpleSymbol(lane, SymbolKind.Namespace, true);
|
|
73
|
+
for (const child of lane.content) {
|
|
74
|
+
const sub = this.trackChildSymbol(child);
|
|
75
|
+
if (sub)
|
|
76
|
+
sym.children.push(sub);
|
|
77
|
+
}
|
|
78
|
+
return sym;
|
|
79
|
+
}
|
|
80
|
+
trackChildSymbol(child) {
|
|
81
|
+
if (isItemDeclaration(child))
|
|
82
|
+
return this.itemSymbol(child);
|
|
83
|
+
if (isParallelBlock(child))
|
|
84
|
+
return this.parallelSymbol(child);
|
|
85
|
+
if (isGroupBlock(child))
|
|
86
|
+
return this.groupSymbol(child);
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
itemSymbol(item) {
|
|
90
|
+
return this.simpleSymbol(item, SymbolKind.Field);
|
|
91
|
+
}
|
|
92
|
+
parallelSymbol(node) {
|
|
93
|
+
const sym = this.simpleSymbol(node, SymbolKind.Array, true);
|
|
94
|
+
for (const child of node.content) {
|
|
95
|
+
const sub = this.trackChildSymbol(child);
|
|
96
|
+
if (sub)
|
|
97
|
+
sym.children.push(sub);
|
|
98
|
+
}
|
|
99
|
+
return sym;
|
|
100
|
+
}
|
|
101
|
+
groupSymbol(node) {
|
|
102
|
+
const sym = this.simpleSymbol(node, SymbolKind.Object, true);
|
|
103
|
+
for (const child of node.content) {
|
|
104
|
+
const sub = this.trackChildSymbol(child);
|
|
105
|
+
if (sub)
|
|
106
|
+
sym.children.push(sub);
|
|
107
|
+
}
|
|
108
|
+
return sym;
|
|
109
|
+
}
|
|
110
|
+
simpleSymbol(entity, kind, withChildrenSlot = false) {
|
|
111
|
+
const range = entity.$cstNode.range;
|
|
112
|
+
const name = entity.name ?? entity.title ?? entityKind(entity);
|
|
113
|
+
const detail = entity.title && entity.name ? entity.title : entityKind(entity);
|
|
114
|
+
const symbol = {
|
|
115
|
+
name,
|
|
116
|
+
detail,
|
|
117
|
+
kind,
|
|
118
|
+
range,
|
|
119
|
+
selectionRange: nameRangeOf(entity) ?? range,
|
|
120
|
+
};
|
|
121
|
+
if (withChildrenSlot)
|
|
122
|
+
symbol.children = [];
|
|
123
|
+
return symbol;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=document-symbols.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-symbols.js","sourceRoot":"","sources":["../../src/providers/document-symbols.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GAKpB,MAAM,eAAe,CAAC;AASvB,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,OAAO,6BAA6B;IACtC,YAAY,SAA6B;QACrC,2BAA2B;IAC/B,CAAC;IAED,UAAU,CACN,QAAyB,EACzB,OAA6B,EAC7B,YAAgC;QAEhC,MAAM,IAAI,GAAG,gBAAgB,CA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KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,GAAG;gBAAE,GAAG,CAAC,QAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,YAAY,CAChB,MAAmD,EACnD,IAAgB,EAChB,gBAAgB,GAAG,KAAK;QAExB,MAAM,KAAK,GAAU,MAAM,CAAC,QAAS,CAAC,KAAK,CAAC;QAC5C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/E,MAAM,MAAM,GAAmB;YAC3B,IAAI;YACJ,MAAM;YACN,IAAI;YACJ,KAAK;YACL,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,KAAK;SAC/C,CAAC;QACF,IAAI,gBAAgB;YAAE,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;QAC3C,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LangiumDocument, MaybePromise } from 'langium';
|
|
2
|
+
import type { HoverProvider } from 'langium/lsp';
|
|
3
|
+
import type { CancellationToken, Hover, HoverParams } from 'vscode-languageserver';
|
|
4
|
+
import type { NowlineLspServices } from '../nowline-lsp-module.js';
|
|
5
|
+
/**
|
|
6
|
+
* Hover provider. Surfaces the resolved entity (kind + id + title), plus the
|
|
7
|
+
* subset of properties most authors care about while editing — status, owner,
|
|
8
|
+
* link, date, duration / size — when the cursor sits on either:
|
|
9
|
+
*
|
|
10
|
+
* - The `name=ID` token of an entity declaration.
|
|
11
|
+
* - The value of a reference property (`after:`, `before:`, `owner:`, etc.).
|
|
12
|
+
*/
|
|
13
|
+
export declare class NowlineHoverProvider implements HoverProvider {
|
|
14
|
+
constructor(_services: NowlineLspServices);
|
|
15
|
+
getHoverContent(document: LangiumDocument, params: HoverParams, _cancelToken?: CancellationToken): MaybePromise<Hover | undefined>;
|
|
16
|
+
private hoverFor;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=hover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../src/providers/hover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,WAAW,EAAS,MAAM,uBAAuB,CAAC;AAE1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAanE;;;;;;;GAOG;AACH,qBAAa,oBAAqB,YAAW,aAAa;gBAC1C,SAAS,EAAE,kBAAkB;IAIzC,eAAe,CACX,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,WAAW,EACnB,YAAY,CAAC,EAAE,iBAAiB,GACjC,YAAY,CAAC,KAAK,GAAG,SAAS,CAAC;IAoBlC,OAAO,CAAC,QAAQ;CA2CnB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { MarkupKind } from 'vscode-languageserver';
|
|
2
|
+
import { buildEntityIndex, declarationAt, entityKind, fileFromDocument, leafAt, propertyValueAt, propKey, REFERENCE_PROP_KEYS, } from '../references/ast-utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Hover provider. Surfaces the resolved entity (kind + id + title), plus the
|
|
5
|
+
* subset of properties most authors care about while editing — status, owner,
|
|
6
|
+
* link, date, duration / size — when the cursor sits on either:
|
|
7
|
+
*
|
|
8
|
+
* - The `name=ID` token of an entity declaration.
|
|
9
|
+
* - The value of a reference property (`after:`, `before:`, `owner:`, etc.).
|
|
10
|
+
*/
|
|
11
|
+
export class NowlineHoverProvider {
|
|
12
|
+
constructor(_services) {
|
|
13
|
+
/* AST helpers are pure. */
|
|
14
|
+
}
|
|
15
|
+
getHoverContent(document, params, _cancelToken) {
|
|
16
|
+
const file = fileFromDocument(document);
|
|
17
|
+
if (!file)
|
|
18
|
+
return undefined;
|
|
19
|
+
const offset = document.textDocument.offsetAt(params.position);
|
|
20
|
+
const leaf = leafAt(document, offset);
|
|
21
|
+
if (!leaf)
|
|
22
|
+
return undefined;
|
|
23
|
+
const decl = declarationAt(leaf);
|
|
24
|
+
if (decl)
|
|
25
|
+
return this.hoverFor(decl, leaf.range);
|
|
26
|
+
const propHit = propertyValueAt(leaf);
|
|
27
|
+
if (propHit && REFERENCE_PROP_KEYS.has(propKey(propHit.prop))) {
|
|
28
|
+
const target = buildEntityIndex(file).get(propHit.value);
|
|
29
|
+
if (!target)
|
|
30
|
+
return undefined;
|
|
31
|
+
return this.hoverFor(target, leaf.range);
|
|
32
|
+
}
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
hoverFor(entity, range) {
|
|
36
|
+
const kind = entityKind(entity);
|
|
37
|
+
const id = entity.name ?? '';
|
|
38
|
+
const title = entity.title;
|
|
39
|
+
const lines = [];
|
|
40
|
+
const header = id ? `**${kind} \`${id}\`**` : `**${kind}**`;
|
|
41
|
+
lines.push(header);
|
|
42
|
+
if (title)
|
|
43
|
+
lines.push(`_${title}_`);
|
|
44
|
+
const props = entity
|
|
45
|
+
.properties ?? [];
|
|
46
|
+
const surfaced = [
|
|
47
|
+
'status',
|
|
48
|
+
'owner',
|
|
49
|
+
'link',
|
|
50
|
+
'date',
|
|
51
|
+
'duration',
|
|
52
|
+
'size',
|
|
53
|
+
'effort',
|
|
54
|
+
'capacity',
|
|
55
|
+
];
|
|
56
|
+
const rendered = [];
|
|
57
|
+
for (const key of surfaced) {
|
|
58
|
+
const prop = props.find((p) => propKey(p) === key);
|
|
59
|
+
if (!prop)
|
|
60
|
+
continue;
|
|
61
|
+
const value = prop.value ?? prop.values?.join(', ');
|
|
62
|
+
if (value)
|
|
63
|
+
rendered.push(`- \`${key}:\` ${value}`);
|
|
64
|
+
}
|
|
65
|
+
if (rendered.length) {
|
|
66
|
+
lines.push('');
|
|
67
|
+
lines.push(...rendered);
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
range,
|
|
71
|
+
contents: {
|
|
72
|
+
kind: MarkupKind.Markdown,
|
|
73
|
+
value: lines.join('\n'),
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=hover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover.js","sourceRoot":"","sources":["../../src/providers/hover.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACH,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,MAAM,EAEN,eAAe,EACf,OAAO,EACP,mBAAmB,GACtB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,OAAO,oBAAoB;IAC7B,YAAY,SAA6B;QACrC,2BAA2B;IAC/B,CAAC;IAED,eAAe,CACX,QAAyB,EACzB,MAAmB,EACnB,YAAgC;QAEhC,MAAM,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI;YAAE,OAAO,SAAS,CAAC;QAC5B,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/D,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,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Q;YACR,OAAO;YACP,MAAM;YACN,MAAM;YACN,UAAU;YACV,MAAM;YACN,QAAQ;YACR,UAAU;SACb,CAAC;QACF,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAoB,CAAC,KAAK,GAAG,CAAC,CAAC;YACtE,IAAI,CAAC,IAAI;gBAAE,SAAS;YACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACpD,IAAI,KAAK;gBAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,KAAK,EAAE,CAAC,CAAC;QACvD,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YAClB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QAC5B,CAAC;QAED,OAAO;YACH,KAAK;YACL,QAAQ,EAAE;gBACN,IAAI,EAAE,UAAU,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;aAC1B;SACJ,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LangiumDocument, MaybePromise } from 'langium';
|
|
2
|
+
import type { ReferencesProvider } from 'langium/lsp';
|
|
3
|
+
import type { CancellationToken, ReferenceParams } from 'vscode-languageserver';
|
|
4
|
+
import { Location } from 'vscode-languageserver';
|
|
5
|
+
import type { NowlineLspServices } from '../nowline-lsp-module.js';
|
|
6
|
+
/**
|
|
7
|
+
* Custom find-references provider. Resolves the symbol the cursor is on to a
|
|
8
|
+
* target id (either the declared name itself or the value the cursor sits on
|
|
9
|
+
* inside a reference property), then walks the file collecting every
|
|
10
|
+
* text-matching usage in known reference-property positions.
|
|
11
|
+
*
|
|
12
|
+
* Honours `params.context.includeDeclaration`: when true, the declaration
|
|
13
|
+
* site is included in the result list.
|
|
14
|
+
*/
|
|
15
|
+
export declare class NowlineReferencesProvider implements ReferencesProvider {
|
|
16
|
+
constructor(_services: NowlineLspServices);
|
|
17
|
+
findReferences(document: LangiumDocument, params: ReferenceParams, _cancelToken?: CancellationToken): MaybePromise<Location[]>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=references.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../src/providers/references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAYnE;;;;;;;;GAQG;AACH,qBAAa,yBAA0B,YAAW,kBAAkB;gBACpD,SAAS,EAAE,kBAAkB;IAIzC,cAAc,CACV,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,eAAe,EACvB,YAAY,CAAC,EAAE,iBAAiB,GACjC,YAAY,CAAC,QAAQ,EAAE,CAAC;CA6B9B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { CstUtils } from 'langium';
|
|
2
|
+
import { Location } from 'vscode-languageserver';
|
|
3
|
+
import { declarationAt, fileFromDocument, findDeclarationRange, leafAt, propertyValueAt, propKey, REFERENCE_PROP_KEYS, visitAllProperties, } from '../references/ast-utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* Custom find-references provider. Resolves the symbol the cursor is on to a
|
|
6
|
+
* target id (either the declared name itself or the value the cursor sits on
|
|
7
|
+
* inside a reference property), then walks the file collecting every
|
|
8
|
+
* text-matching usage in known reference-property positions.
|
|
9
|
+
*
|
|
10
|
+
* Honours `params.context.includeDeclaration`: when true, the declaration
|
|
11
|
+
* site is included in the result list.
|
|
12
|
+
*/
|
|
13
|
+
export class NowlineReferencesProvider {
|
|
14
|
+
constructor(_services) {
|
|
15
|
+
/* AST helpers are pure. */
|
|
16
|
+
}
|
|
17
|
+
findReferences(document, params, _cancelToken) {
|
|
18
|
+
const file = fileFromDocument(document);
|
|
19
|
+
if (!file)
|
|
20
|
+
return [];
|
|
21
|
+
const offset = document.textDocument.offsetAt(params.position);
|
|
22
|
+
const leaf = leafAt(document, offset);
|
|
23
|
+
if (!leaf)
|
|
24
|
+
return [];
|
|
25
|
+
const targetId = resolveTargetId(leaf);
|
|
26
|
+
if (!targetId)
|
|
27
|
+
return [];
|
|
28
|
+
const locations = [];
|
|
29
|
+
const uri = document.uri.toString();
|
|
30
|
+
if (params.context.includeDeclaration) {
|
|
31
|
+
const declRange = findDeclarationRange(file, targetId);
|
|
32
|
+
if (declRange)
|
|
33
|
+
locations.push(Location.create(uri, declRange));
|
|
34
|
+
}
|
|
35
|
+
visitAllProperties(file, (prop) => {
|
|
36
|
+
if (!REFERENCE_PROP_KEYS.has(propKey(prop)))
|
|
37
|
+
return;
|
|
38
|
+
for (const leafNode of valueLeavesOf(prop.$cstNode)) {
|
|
39
|
+
if (leafNode.text === targetId) {
|
|
40
|
+
locations.push(Location.create(uri, leafNode.range));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return locations;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function resolveTargetId(leaf) {
|
|
48
|
+
const decl = declarationAt(leaf);
|
|
49
|
+
if (decl?.name)
|
|
50
|
+
return decl.name;
|
|
51
|
+
const propHit = propertyValueAt(leaf);
|
|
52
|
+
if (propHit && REFERENCE_PROP_KEYS.has(propKey(propHit.prop))) {
|
|
53
|
+
return propHit.value;
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
function* valueLeavesOf(cst) {
|
|
58
|
+
if (!cst)
|
|
59
|
+
return;
|
|
60
|
+
for (const leaf of CstUtils.flattenCst(cst)) {
|
|
61
|
+
if (leaf.hidden)
|
|
62
|
+
continue;
|
|
63
|
+
// Skip the property key (`after:` / `owner:` / …) so it doesn't
|
|
64
|
+
// surface as a self-reference.
|
|
65
|
+
if (leaf.text.endsWith(':'))
|
|
66
|
+
continue;
|
|
67
|
+
yield leaf;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=references.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"references.js","sourceRoot":"","sources":["../../src/providers/references.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EACH,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,EACN,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,OAAO,yBAAyB;IAClC,YAAY,SAA6B;QACrC,2BAA2B;IAC/B,CAAC;IAED,cAAc,CACV,QAAyB,EACzB,MAAuB,EACvB,YAAgC;QAEhC,MAAM,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/D,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,IAA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OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAC5D,OAAO,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,QAAQ,CAAC,CAAC,aAAa,CAAC,GAAwB;IAC5C,IAAI,CAAC,GAAG;QAAE,OAAO;IACjB,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1C,IAAI,IAAI,CAAC,MAAM;YAAE,SAAS;QAC1B,gEAAgE;QAChE,+BAA+B;QAC/B,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,SAAS;QACtC,MAAM,IAAI,CAAC;IACf,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LangiumDocument, MaybePromise } from 'langium';
|
|
2
|
+
import type { RenameProvider } from 'langium/lsp';
|
|
3
|
+
import type { CancellationToken, PrepareRenameParams, Range, RenameParams, TextDocumentPositionParams, WorkspaceEdit } from 'vscode-languageserver';
|
|
4
|
+
import type { NowlineLspServices } from '../nowline-lsp-module.js';
|
|
5
|
+
/**
|
|
6
|
+
* Rename an entity id (item, swimlane, anchor, etc.) and propagate the change
|
|
7
|
+
* to every reference position in the file. Refuses to rename when the cursor
|
|
8
|
+
* isn't on a renameable token, when the new name collides with an existing
|
|
9
|
+
* declaration, or when the new name isn't a valid Nowline identifier.
|
|
10
|
+
*/
|
|
11
|
+
export declare class NowlineRenameProvider implements RenameProvider {
|
|
12
|
+
constructor(_services: NowlineLspServices);
|
|
13
|
+
prepareRename(document: LangiumDocument, params: TextDocumentPositionParams | PrepareRenameParams, _cancelToken?: CancellationToken): MaybePromise<Range | undefined>;
|
|
14
|
+
rename(document: LangiumDocument, params: RenameParams, _cancelToken?: CancellationToken): Promise<WorkspaceEdit | undefined>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=rename.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename.d.ts","sourceRoot":"","sources":["../../src/providers/rename.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EACR,iBAAiB,EAEjB,mBAAmB,EACnB,KAAK,EACL,YAAY,EACZ,0BAA0B,EAE1B,aAAa,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAYnE;;;;;GAKG;AACH,qBAAa,qBAAsB,YAAW,cAAc;gBAC5C,SAAS,EAAE,kBAAkB;IAIzC,aAAa,CACT,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,0BAA0B,GAAG,mBAAmB,EACxD,YAAY,CAAC,EAAE,iBAAiB,GACjC,YAAY,CAAC,KAAK,GAAG,SAAS,CAAC;IAI5B,MAAM,CACR,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,YAAY,EACpB,YAAY,CAAC,EAAE,iBAAiB,GACjC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAmCxC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CstUtils } from 'langium';
|
|
2
|
+
import { declarationAt, fileFromDocument, findDeclarationRange, leafAt, propertyValueAt, propKey, REFERENCE_PROP_KEYS, visitAllProperties, } from '../references/ast-utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Rename an entity id (item, swimlane, anchor, etc.) and propagate the change
|
|
5
|
+
* to every reference position in the file. Refuses to rename when the cursor
|
|
6
|
+
* isn't on a renameable token, when the new name collides with an existing
|
|
7
|
+
* declaration, or when the new name isn't a valid Nowline identifier.
|
|
8
|
+
*/
|
|
9
|
+
export class NowlineRenameProvider {
|
|
10
|
+
constructor(_services) {
|
|
11
|
+
/* AST helpers are pure. */
|
|
12
|
+
}
|
|
13
|
+
prepareRename(document, params, _cancelToken) {
|
|
14
|
+
return renameRangeAt(document, params.position)?.range;
|
|
15
|
+
}
|
|
16
|
+
async rename(document, params, _cancelToken) {
|
|
17
|
+
const file = fileFromDocument(document);
|
|
18
|
+
if (!file)
|
|
19
|
+
return undefined;
|
|
20
|
+
const target = renameRangeAt(document, params.position);
|
|
21
|
+
if (!target)
|
|
22
|
+
return undefined;
|
|
23
|
+
const newName = params.newName;
|
|
24
|
+
if (!isValidId(newName)) {
|
|
25
|
+
throw new Error(`"${newName}" is not a valid Nowline identifier. Use letters, digits, underscores, and dashes (must start with a letter or underscore).`);
|
|
26
|
+
}
|
|
27
|
+
const edits = [];
|
|
28
|
+
const uri = document.uri.toString();
|
|
29
|
+
const declRange = findDeclarationRange(file, target.id);
|
|
30
|
+
if (declRange)
|
|
31
|
+
edits.push({ range: declRange, newText: newName });
|
|
32
|
+
visitAllProperties(file, (prop) => {
|
|
33
|
+
if (!REFERENCE_PROP_KEYS.has(propKey(prop)))
|
|
34
|
+
return;
|
|
35
|
+
const cst = prop.$cstNode;
|
|
36
|
+
if (!cst)
|
|
37
|
+
return;
|
|
38
|
+
for (const leaf of CstUtils.flattenCst(cst)) {
|
|
39
|
+
if (leaf.hidden)
|
|
40
|
+
continue;
|
|
41
|
+
if (leaf.text.endsWith(':'))
|
|
42
|
+
continue;
|
|
43
|
+
if (leaf.text === target.id) {
|
|
44
|
+
edits.push({ range: leaf.range, newText: newName });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
if (edits.length === 0)
|
|
49
|
+
return undefined;
|
|
50
|
+
return { changes: { [uri]: edits } };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function renameRangeAt(document, position) {
|
|
54
|
+
const offset = document.textDocument.offsetAt(position);
|
|
55
|
+
const leaf = leafAt(document, offset);
|
|
56
|
+
if (!leaf)
|
|
57
|
+
return undefined;
|
|
58
|
+
const decl = declarationAt(leaf);
|
|
59
|
+
if (decl?.name === leaf.text) {
|
|
60
|
+
return { id: decl.name, range: leaf.range };
|
|
61
|
+
}
|
|
62
|
+
const hit = propertyValueAt(leaf);
|
|
63
|
+
if (hit && REFERENCE_PROP_KEYS.has(propKey(hit.prop))) {
|
|
64
|
+
return { id: hit.value, range: hit.valueNode.range };
|
|
65
|
+
}
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
const ID_RE = /^[a-zA-Z_][a-zA-Z0-9_-]*$/;
|
|
69
|
+
function isValidId(value) {
|
|
70
|
+
return ID_RE.test(value);
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=rename.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename.js","sourceRoot":"","sources":["../../src/providers/rename.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAanC,OAAO,EACH,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,EACN,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,4BAA4B,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,OAAO,qBAAqB;IAC9B,YAAY,SAA6B;QACrC,2BAA2B;IAC/B,CAAC;IAED,aAAa,CACT,QAAyB,EACzB,MAAwD,EACxD,YAAgC;QAEhC,OAAO,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,MAAM,CACR,QAAyB,EACzB,MAAoB,EACpB,YAAgC;QAEhC,MAAM,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI;YAAE,OAAO,SAAS,CAAC;QAC5B,MAAM,MAAM,GAAG,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;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AE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;IACzC,CAAC;CACJ;AAOD,SAAS,aAAa,CAAC,QAAyB,EAAE,QAAkB;IAChE,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QAC3B,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IAChD,CAAC;IACD,MAAM,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,GAAG,IAAI,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACpD,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACzD,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,MAAM,KAAK,GAAG,2BAA2B,CAAC;AAC1C,SAAS,SAAS,CAAC,KAAa;IAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { AnchorDeclaration, EntityProperty, FootnoteDeclaration, GroupBlock, ItemDeclaration, LabelDeclaration, MilestoneDeclaration, NowlineFile, ParallelBlock, PersonDeclaration, SizeDeclaration, StatusDeclaration, StyleDeclaration, SwimlaneDeclaration, SymbolDeclaration, TeamDeclaration } from '@nowline/core';
|
|
2
|
+
import type { AstNode, CstNode, LangiumDocument } from 'langium';
|
|
3
|
+
import type { Range } from 'vscode-languageserver';
|
|
4
|
+
/**
|
|
5
|
+
* Property keys whose value(s) name another entity in the same file. Used by
|
|
6
|
+
* definition / references / rename / completion to decide whether the cursor
|
|
7
|
+
* sits on an id reference.
|
|
8
|
+
*
|
|
9
|
+
* Wider than the validator's `checkReferenceResolution` (which is strict only
|
|
10
|
+
* for sequencing — `after` / `before` / `on`). Categorisation references
|
|
11
|
+
* (`size` / `status` / `style` / `labels`), decoration references
|
|
12
|
+
* (`icon` / `capacity-icon`), and ownership references (`owner` / `team`) are
|
|
13
|
+
* permissive in the validator (an undeclared id is not an error) but still
|
|
14
|
+
* navigable when a declaration exists.
|
|
15
|
+
*
|
|
16
|
+
* `footnote:` is intentionally absent — the legacy `item … footnote:foo`
|
|
17
|
+
* form was removed in favor of the spec-mandated reverse direction.
|
|
18
|
+
* Footnote association flows only from the footnote declaration's `on:`,
|
|
19
|
+
* and the validator now rejects `footnote:` as a property on host entities.
|
|
20
|
+
*/
|
|
21
|
+
export declare const REFERENCE_PROP_KEYS: Set<string>;
|
|
22
|
+
/** Status value-completion source: built-in statuses ship with the renderer. */
|
|
23
|
+
export declare const BUILTIN_STATUSES: readonly string[];
|
|
24
|
+
/**
|
|
25
|
+
* Built-in `capacity-icon:` vocabulary. Mirrors `BUILTIN_CAPACITY_ICONS` in
|
|
26
|
+
* the validator — kept as a literal here so the LSP doesn't have to import a
|
|
27
|
+
* non-public symbol from `@nowline/core`.
|
|
28
|
+
*/
|
|
29
|
+
export declare const BUILTIN_CAPACITY_ICONS: readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* Built-in `icon:` vocabulary. Superset of `BUILTIN_CAPACITY_ICONS` plus the
|
|
32
|
+
* entity-decoration glyphs the renderer ships.
|
|
33
|
+
*/
|
|
34
|
+
export declare const BUILTIN_ICON_NAMES: readonly string[];
|
|
35
|
+
/** Strip the trailing `:` an `EntityProperty.key` carries from the grammar. */
|
|
36
|
+
export declare function propKey(prop: {
|
|
37
|
+
key: string;
|
|
38
|
+
}): string;
|
|
39
|
+
/**
|
|
40
|
+
* Named declaration shapes we expose for navigation. All have `name?: string`,
|
|
41
|
+
* `title?: string`, and `properties?: EntityProperty[]`.
|
|
42
|
+
*
|
|
43
|
+
* Includes both roadmap-section declarations (item, swimlane, person, …) and
|
|
44
|
+
* config-section declarations (`style`, `symbol`) so cmd+click on
|
|
45
|
+
* `style:enterprise-style` and `icon:my-symbol` resolves to the right place.
|
|
46
|
+
*/
|
|
47
|
+
export type NamedEntity = RoadmapEntryNamed | ItemDeclaration | ParallelBlock | GroupBlock | StyleDeclaration | SymbolDeclaration;
|
|
48
|
+
type RoadmapEntryNamed = SwimlaneDeclaration | AnchorDeclaration | MilestoneDeclaration | FootnoteDeclaration | PersonDeclaration | TeamDeclaration | LabelDeclaration | SizeDeclaration | StatusDeclaration;
|
|
49
|
+
/**
|
|
50
|
+
* Walk the `NowlineFile` and collect every entity that owns an `id`. Covers
|
|
51
|
+
* roadmap-section entities (mirrors the validator's `collectReferenceableIds`)
|
|
52
|
+
* plus the named config-section declarations (`style`, `symbol`) so style and
|
|
53
|
+
* symbol references navigate correctly. Anonymous config blocks (`scale`,
|
|
54
|
+
* `calendar`, `default <entity>`) are skipped.
|
|
55
|
+
*/
|
|
56
|
+
export declare function collectNamedEntities(file: NowlineFile): NamedEntity[];
|
|
57
|
+
/**
|
|
58
|
+
* Build a map from id → declaring entity. When a name appears multiple times
|
|
59
|
+
* the validator already flags it; we keep the first occurrence so navigation
|
|
60
|
+
* is deterministic.
|
|
61
|
+
*/
|
|
62
|
+
export declare function buildEntityIndex(file: NowlineFile): Map<string, NamedEntity>;
|
|
63
|
+
/** Visit every `EntityProperty` reachable from a roadmap entry, depth-first. */
|
|
64
|
+
export declare function visitProperties(node: AstNode, visit: (prop: EntityProperty, owner: AstNode) => void): void;
|
|
65
|
+
/**
|
|
66
|
+
* Iterate every `EntityProperty` in the file, including those on the roadmap
|
|
67
|
+
* declaration itself, plus the properties on top-level config entries (style /
|
|
68
|
+
* default / symbol blocks). Useful for find-references and completion when the
|
|
69
|
+
* cursor isn't necessarily inside a roadmap entry.
|
|
70
|
+
*/
|
|
71
|
+
export declare function visitAllProperties(file: NowlineFile, visit: (prop: EntityProperty, owner: AstNode) => void): void;
|
|
72
|
+
/**
|
|
73
|
+
* Pull the `NowlineFile` AST root from a Langium document.
|
|
74
|
+
*/
|
|
75
|
+
export declare function fileFromDocument(document: LangiumDocument): NowlineFile | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Find the leaf CST node directly under the given offset. Wraps
|
|
78
|
+
* `CstUtils.findLeafNodeAtOffset` to make the call sites read clearly.
|
|
79
|
+
*/
|
|
80
|
+
export declare function leafAt(document: LangiumDocument, offset: number): CstNode | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* When `leaf` sits inside the value(s) of an `EntityProperty`, return the
|
|
83
|
+
* containing property along with the matched value text. Returns `undefined`
|
|
84
|
+
* when the leaf is the property key, surrounding punctuation, or otherwise
|
|
85
|
+
* outside a property value.
|
|
86
|
+
*
|
|
87
|
+
* Used by definition / hover / references to detect "cursor on a reference".
|
|
88
|
+
*/
|
|
89
|
+
export declare function propertyValueAt(leaf: CstNode | undefined): {
|
|
90
|
+
prop: EntityProperty;
|
|
91
|
+
value: string;
|
|
92
|
+
valueNode: CstNode;
|
|
93
|
+
} | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* When `leaf` is the `name=ID` token of a named entity declaration, return the
|
|
96
|
+
* declaring entity. Returns `undefined` for any other position.
|
|
97
|
+
*/
|
|
98
|
+
export declare function declarationAt(leaf: CstNode | undefined): NamedEntity | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Look up the `name=ID` token range of the entity that declares `id`. Walks
|
|
101
|
+
* `collectNamedEntities` so config-section declarations (style / symbol)
|
|
102
|
+
* participate. Returns `undefined` when no declaration matches.
|
|
103
|
+
*
|
|
104
|
+
* Replaces the per-provider `findDeclarationRange` helpers in
|
|
105
|
+
* references.ts and rename.ts so all providers agree on what "declared"
|
|
106
|
+
* means.
|
|
107
|
+
*/
|
|
108
|
+
export declare function findDeclarationRange(file: NowlineFile, id: string): Range | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Render a one-line "type id" label used by hover and document-symbols.
|
|
111
|
+
*/
|
|
112
|
+
export declare function entityKind(entity: AstNode): string;
|
|
113
|
+
/**
|
|
114
|
+
* Find the CST node that holds the given entity's `name=ID` token. Walks the
|
|
115
|
+
* entity's CST subtree and returns the first leaf whose text equals the
|
|
116
|
+
* entity's resolved name. Returns `undefined` when the entity has no `name`
|
|
117
|
+
* (anonymous declaration), no CST node, or no matching leaf.
|
|
118
|
+
*/
|
|
119
|
+
export declare function nameRangeOf(entity: AstNode): Range | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Iterate every leaf CST node inside the given root. Convenience wrapper over
|
|
122
|
+
* `CstUtils.flattenCst` so call sites don't need to import the namespace.
|
|
123
|
+
*/
|
|
124
|
+
export declare function flattenLeaves(root: CstNode): IterableIterator<CstNode>;
|
|
125
|
+
export {};
|
|
126
|
+
//# sourceMappingURL=ast-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-utils.d.ts","sourceRoot":"","sources":["../../src/references/ast-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,UAAU,EAEV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACX,aAAa,EAEb,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAEhB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EAClB,MAAM,eAAe,CAAC;AAmBvB,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,C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