Skip to content

Commit eb6aa97

Browse files
committed
docs for lsp and scip extractors
1 parent 49fc3ba commit eb6aa97

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,39 @@ Options:
158158
| TypeScript | scip | lsp (typescript-language-server) | |
159159
| Zig | | lsp (zls) | |
160160

161+
Granularity of extractions:
162+
161163
- Namespace dependencies - Coarser-grained dependencies only between modules/files
162164
- Function dependencies - Finer-grained including dependencies between functions/methods within modules/files
163165

166+
##### LSP-based extractors
167+
168+
[LSP](https://langserver.org/) language servers are used to analyze code.
169+
The corresponding language server must be installed and available on the PATH.
170+
171+
For example to extract TypeScript dependencies using typescript-language-server (installed with `npm install -g typescript-language-server`):
172+
173+
```bash
174+
clojure -M:stratify -f ts-lsp -o graph.dgml src
175+
```
176+
177+
##### SCIP-based extractors
178+
179+
This approach leverages [SCIP](https://github.com/sourcegraph/scip) index files.
180+
181+
For selected languages SCIP indexers can be invoked automatically.
182+
For example to extract Python dependencies (`scip-python` must be installed and available on PATH):
183+
184+
```bash
185+
clojure -M:stratify -f python-scip -o graph.dgml src
186+
```
187+
188+
For additional languages generate the index first, the use `-f scip` to extract the index file:
189+
```bash
190+
scip-python index # creates index.scip
191+
clojure -M:stratify -f scip -o graph.dgml index.scip
192+
```
193+
164194
### Using Visual Studio DGML Editor
165195

166196
Once you extracted the graph use [Visual Studio](https://visualstudio.microsoft.com/) to visualize it.

0 commit comments

Comments
 (0)