Editor Setup
Enable Prisma 8 schema hints in VS Code and troubleshoot missing completions and diagnostics
Use this guide to enable scalar completion, attribute signatures, hover descriptions, and IDB diagnostics for Prisma 8 schemas in VS Code. The Schema & Config reference describes the required directive and available editor metadata.
Configure the editor
-
Install the Prisma VS Code extension with Prisma 8 support and the project's local
prismaCLI, as shown in the Quick Start. In a monorepo, install the CLI in the app that owns the schema and config. -
Configure
prisma.config.tswith@prisma-idb/family-idb/controlandprismaIdbContract(...), following the Quick Start config. -
Put
// use prisma-8on the first line of each Prisma 8 schema, before other comments or declarations:// use prisma-8 model Todo { id String @id title String } -
Trust the workspace and set
prisma.pinToPrisma6tofalsein VS Code settings. -
Run Prisma: Restart Language Server after changing the directive, config, or installed packages.
The Output panel should show a Prisma ORM 8 Language Server channel for the app. Open the schema to check scalar completions and hover descriptions, attribute signatures and documentation (including @idb.exclude and @@idb.exclude), and schema diagnostics.
Troubleshoot missing hints
-
Confirm that
// use prisma-8is the first line. Without it, the extension routes the schema to the legacy language server, which does not read IDB's authoring metadata. -
Check that the workspace is trusted and
prisma.pinToPrisma6isfalse. -
Use the Prisma ORM 8 Language Server Output channel to check config-loading errors. In a monorepo, confirm that the app owning the schema has its own local
prismaCLI andprisma.config.ts. -
When using workspace packages, rebuild
@prisma-idb/family-idbbefore restarting the language server so it loads the updated descriptor:pnpm --filter '@prisma-idb/family-idb...' build -
Run Prisma: Restart Language Server again after correcting the configuration or rebuilding packages.