@neuralsea/workspace-indexer 0.2.0 → 0.3.3
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/README.md +43 -0
- package/dist/chunk-IXKSW7IX.js +4500 -0
- package/dist/cli.cjs +4564 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.js +62 -59
- package/dist/index.cjs +4937 -0
- package/dist/index.d.cts +1326 -0
- package/dist/index.d.ts +757 -22
- package/dist/index.js +404 -3
- package/package.json +12 -6
- package/dist/chunk-Z3BRYSQM.js +0 -2481
package/README.md
CHANGED
|
@@ -67,6 +67,26 @@ await ix.closeAsync();
|
|
|
67
67
|
|
|
68
68
|
---
|
|
69
69
|
|
|
70
|
+
## VS Code: high-fidelity symbol graphs (optional)
|
|
71
|
+
|
|
72
|
+
In a VS Code extension, you can pass a `symbolGraphProvider` that uses VS Code (LSP-backed) providers to extract symbols.
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { WorkspaceIndexer, createVSCodeSymbolGraphProvider } from "@neuralsea/workspace-indexer";
|
|
76
|
+
|
|
77
|
+
const symbolGraphProvider = await createVSCodeSymbolGraphProvider({
|
|
78
|
+
languages: ["typescript", "javascript", "python", "go"]
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const ix = new WorkspaceIndexer(workspaceRoot, embedder, {
|
|
82
|
+
symbolGraphProvider: symbolGraphProvider ?? undefined
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
To enable the optional Neo4j graph store, install `neo4j-driver` in your extension/app and set `workspace.graph` in config.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
70
90
|
## CLI
|
|
71
91
|
|
|
72
92
|
### Index a workspace
|
|
@@ -143,6 +163,29 @@ Example: `petri-index.config.json`
|
|
|
143
163
|
|
|
144
164
|
```json
|
|
145
165
|
{
|
|
166
|
+
"workspace": {
|
|
167
|
+
"discovery": {
|
|
168
|
+
"exclude": ["**/vendor/**", "**/node_modules/**"],
|
|
169
|
+
"maxDepth": 8,
|
|
170
|
+
"includeSubmodules": true
|
|
171
|
+
},
|
|
172
|
+
"graph": {
|
|
173
|
+
"provider": "neo4j",
|
|
174
|
+
"neo4j": {
|
|
175
|
+
"uri": "neo4j://localhost:7687",
|
|
176
|
+
"user": "neo4j",
|
|
177
|
+
"password": "password",
|
|
178
|
+
"database": "neo4j",
|
|
179
|
+
"labelPrefix": "Petri"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"repoOverrides": [
|
|
183
|
+
{
|
|
184
|
+
"match": "apps/**",
|
|
185
|
+
"config": { "storage": { "ftsMode": "tokens" } }
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
146
189
|
"storage": {
|
|
147
190
|
"storeText": true,
|
|
148
191
|
"ftsMode": "full"
|