How to Use Supermaven Context on Large Codebases

November 15, 2026

Supermaven‘s 300,000-token context rewards codebases with clear structure: keep files under about 400 lines, name things explicitly, and give the indexer a repository it can finish in under ten minutes. Get those three right and cross-file completions go from occasionally useful to genuinely predictive.

How does the context window actually get used?

The extension indexes your workspace and retrieves the most relevant chunks when you type. It is retrieval, not a raw dump of every file.

That has a direct implication: a codebase where the relevant code is spread across 40 tiny files in 40 directories retrieves badly, because no single chunk tells the model enough. A codebase where a domain lives in three substantial files retrieves well.

Large context raises the ceiling. Structure determines whether you get near it.

What repository hygiene improves completions?

Five changes, all cheap:

  1. Respect the ignore file. Add build output, generated clients, node_modules and vendored dependencies to the ignore list the extension uses. Indexing minified JavaScript wastes context on noise you never edit.
  2. Collapse generated code. If a 3,000-line schema file exists only for type generation, exclude it and let the types come from a smaller hand-authored file.
  3. Co-locate tests with source. A user.ts and user.test.ts next to each other gives the model examples of the API in use.
  4. Keep files under 400 lines. Past that, retrieval chunks lose the file’s shape.
  5. Name functions by intent. calculateProratedRefund gives the model more to work with than calc2.

How do you check that indexing worked?

There is no index inspector, so test behaviorally.

Open a file, type a function name you know exists elsewhere in the repo, and see if the completion completes the signature correctly. Then rename that function in its source file and try again in a different file. If the completion uses the new name, cross-file retrieval is working. If it uses the old name, it is working from stale index data — reload the window.

A second check: open a file in a domain you have never touched. Type a three-line function signature the way you would expect the codebase’s conventions to define it. Good completions here mean the model learned conventions, not just adjacent lines.

What practice patterns get the most out of it?

Write the signature first. Type the function name, parameters and return type, then let completion fill the body. The model does better with a specified contract than with a blank line.

Write the comment above, not beside. A one-line doc comment describing intent, then a blank line, produces a stronger suggestion than the comment inline.

Use it during refactors, not greenfield. In a codebase with 50 existing examples of a pattern, completion is strong. In a brand-new project with no examples, it has nothing to imitate.

Accept partial. Full-block acceptance on unfamiliar code is how subtle bugs land. Take the first two words, finish the line yourself.

Where it underperforms on large repos

Monorepos with duplicated domain logic. If two packages both define a User type with different fields, retrieval may pull the wrong one and the completion will be confidently wrong. That is a structural problem, not a model problem.

Rapidly changing code. Indexes update, but there is a lag measured in minutes. On a branch where you just renamed twelve files, expect a stretch of stale suggestions.

Anything requiring reasoning across three layers of abstraction — say, an ORM call whose behavior depends on a migration. Completion predicts text; it does not trace control flow. For those cases, keep a chat-based assistant in the same editor.

What does a large-repo setup cost?

The free tier is unlimited for individuals, so cost is mostly indexing time: first index on a 200,000-line repo took several minutes, after which it is incremental. The Pro plan near $10/month adds longer context for very large repositories and team controls; only worth it if you have hit the ceiling. Indexing is local CPU, not billed tokens.

Quick Summary

  • Context is retrieval-based: repository structure matters as much as context size.
  • Exclude build output, generated code and vendored deps from indexing.
  • Keep source files under ~400 lines and co-locate tests with implementation.
  • Verify indexing by renaming a function and checking whether completions pick up the change.
  • Write signatures and doc comments first — they improve suggestion quality more than prompting tricks.
  • Free tier is unlimited for individuals; Pro near $10/month only for very large repos and teams.