Clang Flow draws a small call diagram around wherever your cursor is: the function you are
standing in, the functions that call it, and the functions it calls. It is built for C firmware
codebases, where following a call by hand means grepping across a dozen translation units.
Features
Two-hop call flow that follows the cursor. The panel shows the focused function plus its
callers and their callers, and its callees and theirs — two hops each way and no further, so
the picture stays readable on real firmware. The status line counts direct callers and callees
separately from the second hop. Move the cursor into another function and the diagram redraws
around that one, scrolled so the focused function sits in the middle of the panel.
Zoom, scroll and pan. Zoom with Ctrl+mouse wheel (around the pointer) or the − / + /
100% / Fit buttons, from 25% to 300%; the zoom level is kept as the cursor moves. Scroll
with the scrollbars or drag the background to pan — a drag never triggers a jump.
Callers found across the whole workspace. Every .c/.h file is scanned once at startup
and kept current by a file watcher, so a caller living in a different file still appears.
static and externally linked functions with the same name are kept apart, and a function
pointer with exactly one assigned target resolves to that target.
Click a node to jump to its definition. The jump resolves on the node's identity rather
than its label and opens the file beside the panel instead of replacing it.
Unresolved calls are reported, never guessed. A call is drawn only when its target is
really defined in the workspace; anything else becomes a warning line in the Clang Flow
output channel.
Colours come from your theme. All node styling uses VS Code theme tokens, and the four
node states (focused, caller, callee, interrupt handler) differ in colour and stroke width
and dash pattern, so they stay distinguishable in High Contrast themes.
Usage
Open a C or C++ file, put the cursor inside a function, and run Clang Flow: Show Call Flow
Around the Cursor from the Command Palette. The panel stays open and redraws as you move
around. Clicking any node opens that function's definition.
Settings
Setting
Default
Purpose
clangFlow.index.enabled
true
Scan the workspace so cross-file callers appear. Turn off for single-file mode on a tree too large to index.
clangFlow.index.excludeFiles
["iodefine.h"]
Plain file names (not globs) kept out of the scan.
clangFlow.layoutDirection
"LR"
Diagram ranking: LR (left to right) or TB (top to bottom).
clangFlow.updateDelay
500
Milliseconds to wait after the cursor stops before redrawing (0–5000).
Settings apply immediately; no window reload is needed. An out-of-range or malformed value falls
back to the default and writes one line explaining why to the Clang Flow output channel.
Requirements
None beyond VS Code 1.100 or later. Parsing is done in-process with tree-sitter, so no compiler
or external toolchain has to be installed.