The Effect Language Service extracts the dependency graph of anyDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Effect-TS/tsgo/llms.txt
Use this file to discover all available pages before exploring further.
Layer value at your cursor and renders it as a Mermaid flowchart inside the editor’s hover popup. This makes it easy to understand which services a layer provides and which it requires, without reading through nested Layer.provide calls.
What you see on hover
When you hover over any identifier or expression whose type isLayer.Layer<ROut, E, RIn>, the hover popup shows:
- A Mermaid flowchart — nodes represent individual layer values; edges show dependency relationships. Each node is labelled with its source text plus the services it provides and requires.
- An external diagram link — a URL to your configured Mermaid rendering service (e.g., mermaid.live) so you can open the full interactive diagram in a browser.
- Provider/requirer annotations — a JSDoc-style block listing each service, where it is provided, and where it is required, including cross-file locations when applicable.
Configuration
Layer graph behaviour is controlled by three plugin options intsconfig.json.
mermaidProvider
Controls which service is used to render the external Mermaid diagram link included in the hover popup.
| Value | URL prefix |
|---|---|
"mermaid.live" (default) | https://mermaid.live/edit#pako:… |
"mermaid.com" | https://www.mermaid.com/edit#pako:… |
| Custom URL | Any string — used verbatim as the base URL prefix before the encoded diagram |
{"code": "<diagram>"}) appended to the base URL with the pako: prefix.
noExternal
When true, suppresses the external Mermaid link from the hover popup. Only the inline diagram text and the provider/requirer annotations are shown. Useful in air-gapped environments or when you do not want clickable URLs in hover output.
false
layerGraphFollowDepth
Controls how many levels deep the layer graph extraction follows symbol references. At depth 0 (the default), the extractor only expands the layer expression at the cursor. At depth 1, it also follows one level of symbol references (e.g., if AppLayer references DatabaseLayer by name, it resolves DatabaseLayer and includes its structure). Higher values follow more levels transitively.
0
Graph formats
The language service produces three internal graph representations, each rendered into the hover popup:Flat graph (FormatLayerGraph)
Flat graph (FormatLayerGraph)
A
flowchart TD where each node is a single layer value with its source text, provides list, and requires list as a multi-line label. Cross-file nodes include a location annotation (in filename.ts at ln N col N). Edges are labelled with the relationship kind (e.g., provide, merge).Nested graph (FormatNestedLayerGraph)
Nested graph (FormatNestedLayerGraph)
A
flowchart TB where each node is rendered as a nested subgraph with separate Provides and Requires subgraphs inside it. Edges connect matching type nodes between layers using dashed arrows, making it easy to see exactly which type satisfies which requirement.Outline graph (FormatOutlineGraph)
Outline graph (FormatOutlineGraph)
A simplified
flowchart TD showing only the high-level dependency structure between named layer symbols, without internal type details. This is the form used by the layerMagic refactor to determine composition order.The layerMagic refactor
The layer graph powers the layerMagic refactor, which automatically composes a set of layers into the correct Layer.provide / Layer.merge / Layer.provideMerge pipeline.
See Refactors → layerMagic for the full two-step workflow.
How composition is determined
The outline graph is used to compute a topological sort of the layer nodes:- A layer node that provides a service required by another node is placed earlier in the pipeline.
- When a node both provides a new service and satisfies a requirement of a downstream node,
Layer.provideMergeis used. - When a node only merges outputs without satisfying a downstream requirement,
Layer.mergeis used. - When a node purely provides requirements for a downstream node,
Layer.provideis used.
Full example
Given these layer definitions:AppLayer renders a Mermaid flowchart with three nodes and the correct dependency edges, plus a link to view the interactive diagram on mermaid.live.