The VS Code extension provides real-time diagnostics for unused code, duplication, complexity, and boundary violations, powered by the fallow LSP server.Documentation Index
Fetch the complete documentation index at: https://docs.fallow.tools/llms.txt
Use this file to discover all available pages before exploring further.
Code Lens shows reference counts above each export. Click to peek all usages. Exports with zero references stand out immediately.
Features
- Real-time diagnostics for all 15 dead code issue types, updated via LSP without running a separate CLI process
- Code Lens with reference counts above each export (click to peek references)
- Hover information with export usage counts, unused status, and duplicate block locations
- Quick-fix code actions to remove unused exports or delete unused files
- Refactor actions to extract duplicates into shared functions
- Tree views in the sidebar with per-category icons, issue count badge, and welcome view
- Status bar with color-coded severity, rich tooltip breakdown, and command links
- Diagnostic documentation links: click any diagnostic code to open its docs page
- Related information: circular dependencies, duplicate exports, and code duplication diagnostics link to all related files
- Fix preview with a searchable Quick Pick for reviewing and navigating fixes
- JSON schema for
.fallowrc.jsonwith autocomplete and validation - Auto-download of the LSP binary
- Getting Started walkthrough on first install
Installation
Install the extension
Search for “fallow” in the VS Code extensions marketplace, or install from the command line:
Binary resolution
The extension finds binaries automatically. It checks the
fallow.lspPath setting first, then node_modules/.bin/ for a local devDependency (pnpm add -D fallow), then system PATH, or auto-downloads from GitHub releases.Getting Started walkthrough
On first install, a walkthrough opens automatically with four steps: Run Analysis, Explore Results, Fix Issues, and Configure Rules. Each step links directly to the relevant command. You can reopen it from the Command Palette at any time.
Status bar
The status bar shows the current issue count and duplication percentage. It updates in real time as the LSP server completes analysis via a customfallow/analysisComplete notification. No separate CLI process needed.
- Color-coded background: red when unresolved imports are present (errors), yellow when other issues exist (warnings), default when the project is clean
- Rich tooltip: hover to see a per-category breakdown of all issues (unused files, exports, dependencies, circular dependencies, clone groups, etc.)
- Command links in tooltip: Run Analysis, Auto-Fix, and Show Output are one click away
Diagnostics
Every diagnostic includes a clickable diagnostic code (e.g.,unused-export, unresolved-import) that opens the corresponding documentation page at docs.fallow.tools.
Related information
Some diagnostics include related information that links to other files involved in the issue. Click a related location in the Problems panel to jump directly to it.- Circular dependencies: each file in the cycle chain is listed as a related location, so you can trace the full cycle
- Duplicate exports: links to the other files that export the same name
- Code duplication: links to all other instances of the duplicated block
Severity levels
| Issue type | Severity | Appearance |
|---|---|---|
| Unresolved imports | Error (red) | Red underline |
| Unused files, dependencies, circular deps, duplicate exports | Warning (yellow) | Yellow underline |
| Unused exports, types, enum/class members | Hint | Faded text (unnecessary tag) |
| Code duplication | Information (blue) | Blue underline |
Tree views
The sidebar groups issues by type and duplicates by clone family. Each category uses a distinct icon for quick scanning:| Category | Icon |
|---|---|
| Unused files | File |
| Unused exports | Method |
| Unused types | Interface |
| Unused dependencies | Package |
| Unused enum members | Enum member |
| Unresolved imports | Error |
| Circular dependencies | Sync |
| Duplicate exports | Files |
Fix preview
Fallow: Preview Fixes (Dry Run) opens a searchable Quick Pick listing each available fix with its type and file location. Select an item to navigate to it in the editor, or choose Apply all fixes at the bottom to apply everything at once. After applying fixes, the extension automatically saves modified files, restarts the LSP server, and re-runs analysis so diagnostics update immediately.Config autocomplete
.fallowrc.json files get autocomplete and validation powered by the published JSON schema. The extension registers this automatically, no extra setup needed.
Commands
| Command | Description |
|---|---|
| Fallow: Run Analysis | Run full analysis |
| Fallow: Auto-Fix (unexport unused, remove unused deps) | Apply auto-fixes |
| Fallow: Preview Fixes (Dry Run) | Preview fixes in a searchable Quick Pick |
| Fallow: Restart Language Server | Restart the language server |
| Fallow: Show Output Channel | Open the LSP output channel |
Extension settings
Extension settings
| Setting | Default | Description |
|---|---|---|
fallow.lspPath | - | Path to fallow-lsp binary (highest priority, overrides local node_modules/.bin, PATH, and auto-download) |
fallow.autoDownload | true | Auto-download the LSP binary when not found locally or in PATH |
fallow.issueTypes | all | Which issue types to report |
fallow.duplication.threshold | 5 | Minimum lines for duplication reporting |
fallow.duplication.mode | mild | Duplication detection mode |
fallow.production | false | Enable production mode |
fallow.changedSince | "" | Git ref to scope diagnostics and the sidebar to files changed since that ref (mirrors --changed-since). Tag a baseline commit (e.g. fallow-baseline) and set this to the tag to enforce “no new issues going forward” while ignoring pre-existing findings. |
fallow.trace.server | off | LSP trace level for debugging |
Adopting fallow on a legacy codebase
Usefallow.changedSince to keep existing issues hidden while flagging new ones in the Problems panel:
.vscode/settings.json:
.vscode/settings.json so the whole team sees the same scope. Pair the same tag with fallow dead-code --changed-since fallow-baseline in CI to enforce the same contract on PRs.
Shallow clone footgun.
actions/checkout@v4 defaults to fetch-depth: 1 and GitLab CI defaults to GIT_DEPTH: 50. If your baseline tag predates that fetch boundary, --changed-since and fallow.changedSince silently fall back to full scope (the LSP logs a warning to the Fallow output channel). Set fetch-depth: 0 on actions/checkout (or GIT_DEPTH: 0 in GitLab CI) when you use a long-lived baseline tag.Part of the three tracks
VS Code is one of three ways to use fallow:- Agents run
fallowfrom CLI or call MCP tools to verify their own output - You in VS Code see real-time diagnostics, review agent output, and spot issues as you code
- CI catches the rest, so nothing lands in main without passing fallow
See also
Agent integration
How AI agents use fallow via CLI and MCP.
CI integration
Add fallow to your CI pipeline.
Analysis areas
All issue types shown in real time by the extension.