fallow-lsp language server that powers the VS Code extension, through Neovim’s built-in LSP client. The setup is intentionally thin: it launches the existing binary instead of re-implementing any analysis in the editor, so results match the CLI and CI exactly.
Requires Neovim 0.11+ for the
vim.lsp.config / vim.lsp.enable API shown below. Older versions can still attach fallow-lsp through nvim-lspconfig or a manual vim.lsp.start.What works
- Real-time diagnostics for unused files, exports, types, dependencies, enum and class members, unresolved imports, unlisted dependencies, duplicate exports, circular dependencies, and code duplication
- Opt-in security candidate diagnostics when you raise the
security-sinkorsecurity-client-server-leakrule towarnorerrorin your fallow config. Candidates surface as advisoryinformationsquiggles (unverified, verify before acting); the hover leads with the confidence signals and points tofallow security --filefor the full trace, and a quick-fix dismisses the candidate. Default off, so squiggles appear only after you raise the rule. - Hover information with export usage counts, unused status, and duplicate block locations
- Quick-fix code actions to remove unused exports or delete unused files
- Code lens with export reference counts, where Neovim surfaces them
Installation
Install Fallow so fallow-lsp is on your PATH
npm install -D fallow) and point cmd at node_modules/.bin/fallow-lsp.Configuration
init_options is optional; cmd, filetypes, and root_markers alone are enough to attach.
Issue-type toggles
Fallow reads per-issue toggles from LSP initialization options. Set an issue type tofalse to hide it in editor diagnostics without touching your project config. The keys are Fallow’s issue types in kebab-case (unused-exports, unresolved-imports, circular-dependencies, and so on); a client can fetch the live catalog through the custom fallow/issueTypes request to stay in sync.
Scope to changed files
Pass a git ref aschangedSince to scope diagnostics to files changed since that ref, mirroring fallow dead-code --changed-since. This is the Neovim equivalent of the VS Code fallow.changedSince setting, useful for adopting fallow on a legacy codebase without surfacing every pre-existing finding:
When diagnostics appear. Fallow delivers diagnostics through the LSP 3.17 pull model and refreshes them on save. The first analysis runs when the server attaches, so a freshly opened buffer shows findings once the initial pass completes (or after the next save), not necessarily the instant the file opens. Cross-file findings anchored to files you have not opened (for example
package.json for unlisted dependencies) are pushed so they still surface.Binary resolution
Neovim runscmd exactly as configured. If fallow-lsp is not on Neovim’s PATH, point cmd at an absolute path:
Verifying the setup
- Open a TypeScript or JavaScript project.
-
Run
:checkhealth vim.lsp. -
Confirm
fallowis attached:
See also
VS Code extension
The richer editor surface: sidebar views, status bar, and fix preview.
Agent integration
How AI agents use fallow via CLI and MCP.
Analysis areas
All issue types the language server reports.