LucidHover
Hover over any function in your codebase and see what it does — not just a summary of the
function body in isolation, but an explanation grounded in how the function fits into the rest
of the repo: its role, why it exists, who calls it, what it calls, and what could break if you
change it.
Explanations are generated by a local LLM via Ollama and cached in a
local SQLite database. LucidHover never sends your code anywhere: no API keys, no cloud LLM
providers, no telemetry. Everything runs on your machine.
Requirements
- Ollama installed and running locally (LucidHover talks to it over
http://localhost:11434 by default).
- A trusted VS Code workspace — LucidHover only indexes and generates explanations in workspaces
you've granted Workspace Trust to.
LucidHover does not install or manage Ollama for you — it only talks to whatever Ollama is
already running locally. Setup is a one-time, five-minute process:
Setup
- Install Ollama from ollama.com (macOS, Windows, or Linux) and make
sure it's running — on most platforms it starts automatically and stays running in the
background after install; if not, launch it manually before continuing.
- Pull the two models LucidHover uses by default:
ollama pull qwen2.5-coder:1.5b
ollama pull all-minilm
The first (qwen2.5-coder:1.5b) generates explanations; the second (all-minilm) powers local
embeddings/retrieval. Both are small (under 1 GB combined) and only need to be pulled once. If
you'd rather use a different generation model, see lucidHover.modelId in Settings below — pull
that model instead and set the setting to match.
- Install the LucidHover extension in VS Code (Marketplace or a local
.vsix).
- Open a workspace and trust it when prompted — LucidHover only indexes and generates in
trusted workspaces (see Requirements above).
- That's it. LucidHover spawns its local sidecar process automatically on activation — no further
configuration is needed to start hovering.
On first activation in a trusted workspace, LucidHover spawns a local sidecar process that parses
your codebase, ranks functions by importance (call-graph PageRank), and begins generating
explanations in the background. Hovering over an already-indexed function is instant — it's a
cache lookup, never a live model call. A function background indexing hasn't reached yet falls
back to a one-off synchronous generation on hover, so nothing hovering ever shows nothing.
Supported languages: JavaScript, TypeScript, and TSX.
Features
- Hover explanations — role, one-liner summary, and a freshness indicator (fresh / dirty /
stale) right in the hover tooltip.
- Explanation panel — a docked, card-based view with the full explanation (why it exists, side
effects, risk notes, known callers/callees), a regenerate button, copy-to-clipboard, a relative
"generated N ago" timestamp, and a "Back to caller" link when you navigate into a used-by/calls
row.
- Blast radius — see everything that transitively depends on a function before you change it.
- Execution trace — follow a function's primary call chain forward, with inline branches for
alternate paths.
- Cluster summary — a synthesized purpose paragraph over a function and its transitive callers,
built from already-cached explanations (an explicit "Synthesize summary" action, never generated
automatically).
- CodeLens role badges + gutter icons — see each function's role at a glance without hovering.
- Show Most Important Functions — a quick pick of the codebase's highest-importance functions,
for orienting yourself in an unfamiliar repo.
- Search Explanations — fuzzy-search every cached explanation by function name or content.
- Prioritize Indexing for This File — jump a file's functions to the front of the background
indexing queue.
- Pause/Resume Background Indexing — a status bar toggle for when you want indexing to yield
CPU/Ollama capacity to something else, showing a live progress count (including failed attempts),
the function currently being processed, an estimated time remaining, and repo-wide coverage once
a pass finishes, all in the tooltip. Only the most important functions are indexed up front by
default — everything else is generated the first time you hover it.
- Summary docs — generate per-file Markdown summaries from already-cached explanations.
- Automatic staleness tracking — edits and cross-file changes flag affected explanations as
stale so you know when what you're reading no longer matches the code.
Commands
All commands are available from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command |
What it does |
| LucidHover: Show More Detail |
Opens the docked panel for the function under the cursor |
| LucidHover: Refresh Explanation for Function Under Cursor |
Regenerates the current function's explanation |
| LucidHover: Toggle Background Indexing (Pause/Resume) |
Pauses or resumes the background indexing pass |
| LucidHover: Prioritize Indexing for This File |
Jumps this file's uncached functions to the front of the queue (also in the editor context menu) |
| LucidHover: Show Blast Radius for Function Under Cursor |
Shows everything that depends on the current function |
| LucidHover: Trace Execution Path from Function Under Cursor |
Follows the current function's downstream call chain |
| LucidHover: Show Cluster Summary for Function Under Cursor |
Shows a synthesized purpose summary for the function and its transitive callers |
| LucidHover: Synthesize Cluster Summary for Function Under Cursor |
Generates (and caches) the cluster summary above from cached explanations |
| LucidHover: Show Most Important Functions |
Quick pick of the codebase's highest-ranked functions |
| LucidHover: Search Explanations |
Fuzzy-search cached explanations |
| LucidHover: Generate Summary Docs |
Writes per-file Markdown summaries to docs/wiki/ |
| LucidHover: Purge Superseded Cache Rows |
Manually cleans up superseded cache rows |
| LucidHover: Install Git Hooks |
Installs hooks to re-index on checkout/merge/commit |
| LucidHover: Restart Sidecar (Apply Ollama Endpoint Setting) |
Restarts the sidecar to pick up a changed Ollama endpoint |
Settings
| Setting |
Default |
Description |
lucidHover.modelId |
(bundled default) |
Ollama model to use for generation |
lucidHover.ollamaEndpoint |
http://localhost:11434 |
Local Ollama endpoint (loopback only — non-local hosts are rejected) |
lucidHover.backgroundFlushIntervalSeconds |
25 |
How often edited-but-unsaved functions are regenerated in the background |
lucidHover.autoEvictSupersededCache |
true |
Automatically delete a function's old cache row when it's regenerated |
lucidHover.backgroundIndexScope |
topN |
topN pre-generates only the most important functions on startup; fullRepo indexes everything up front |
lucidHover.backgroundIndexTopN |
200 |
How many top-importance functions the startup pass covers when scope is topN |
Privacy
LucidHover is fully local. It does not call out to any cloud service, does not require an account,
and does not collect telemetry. The only network activity is to the local Ollama endpoint
configured above.
How it works
A local Python sidecar parses your code with tree-sitter, builds a call graph, ranks functions by
importance, and generates structured explanations via a local Ollama model. Every explanation is
cached in a local SQLite database keyed on the function's content, its context, the model used,
and the prompt version — so a change to any of those regenerates exactly the right rows, and
nothing else.