WebStorm 2025.2 Help

Prisma

WebStorm integrates with Prisma ORM, providing support for Prisma Schema Language grammar.

Prisma ORM support in WebStorm is backed by the Prisma Language Server. WebStorm is shipped with a bundled Prisma Language Server. However, it is recommended that you keep the Language Server up to date by downloading the latest server version and specifying the path to it on the Settings | Languages & Frameworks | Prisma page as described in Configure the Prisma Language Server.

Before you start

  1. Make sure you have Node.js on your computer. Configure a Node.js interpreter in your project as described in Configuring a local Node.js interpreter, in Using Node.js on Windows Subsystem for Linux, or in Configuring remote Node.js interpreters.

    Find detailed information about the required Node.js versions on the Prisma ORM official website.

  2. Install and enable the Prisma ORM plugin on the Settings | Plugins page, tab Marketplace, as described in Installing plugins from JetBrains Marketplace.

Configure the Prisma Language Server

Prisma ORM support in WebStorm is backed by the Prisma Language Server. WebStorm is shipped with a bundled Prisma Language Server. However, it is recommended that you keep the Language Server up to date

  1. Install the latest version of the @prisma/language-server globally. To do that, open the embedded Terminal (Alt+F12) and type:

    npm install -g @prisma/language-server
  2. Open the Settings dialog (Ctrl+Alt+S) and go to Settings | Languages & Frameworks Prisma.

  3. In the Language Server package field, specify the path to the @prisma/language-server package.

    Specify the path to the Prisma Language Server
  4. Make sure the Enabled option is selected.

    Select the Disabled option to turn off the Prisma Language Server and use only internal WebStorm coding assistance and inspections.

Code completion

WebStorm provides Prisma Schema Language-aware code completion in schema files including documentation for selected completion suggestions.

Completion in Prisma Schema
  • By default, completion suggestions are shown as you type. To turn this behavior off, press Ctrl+Alt+S to open settings and select Settings | Editor | General | Code Completion, then clear the Show suggestions as you type checkbox.

  • To invoke completion manually, press Ctrl+Space.

Code inspection

You can view Prisma LSP diagnostics right in the editor on hovering over a highlighted code element where a problem is detected.

LSP validation errors

Detected errors are shown in the Problems tool window and in a popup right in the editor on hover.

  • Missing mandatory attributes

    Missing mandatory attribute
  • Missing binary targets

  • Missing @@schema attributes are detected and a quick-fix is suggested.

    Missing @@schema attribute - inspection and quick-fix

Documentation look-up

WebStorm shows documentation for various Prisma-specific symbols, including datasource and generator blocks.

Quick documentation lookup

The Documentation popup is displayed when you hover over a symbol in the editor or press Ctrl+Q, as well as on code completion.

To view documentation for a symbol in the Structure tool window, select the symbol and press Ctrl+Q.

Quick Doc from the Structure tool window

Learn more from Code reference information.

Comments

You can add comments above, below, and inside data models. Multiline comments are welcome.

To add a comment, start typing /** and press Enter. WebStorm adds the closing */ and * at the beginning of each line.

Hovering over a symbol shows the comment in the Documentation popup with proper formatting.

Comments are properly rendered in the Documentation popup

Alternatively, examine comments in the Rendered View mode. For that, click The Toggle Rendered View icon in the gutter next to a comment or press Ctrl+Alt+Q.

To view the comment in the Documentation tool window, hover over a symbol, click the More icon in the Documentation popup, and then select Open in Documentation Tool Window.

Open comments in the documentation tool window

Structure view

With WebStorm, you can view and navigate the structure of schema files in the Structure tool window (Alt+7). The tool window is synchronized with the currently open Prisma Schema, so when you select an item in the tool window, it is automatically selected in the schema file.

Block-specific coding assistance

Generator blocks

  • WebStorm suggests code completion in generator blocks on the fly, providing quick documentation for selected items.

    Code completion in generator blocks
  • WebStorm recognizes binary targets, providing syntax highlighting, code completion, and quick documentation.

  • In addition to the prisma-client-js generator, which generates a Prisma Client in the node_modules folder, WebStorm recognizes and provides code completion and quick documentation for the prisma-client generator, which outputs plain TypeScript code.

    Support for the prisma-client generator

    Learn more from the Prisma official website.

Datasource blocks

WebStorm suggests code completion in datasource blocks on the fly, providing quick documentation for selected items.

Support for multiple database schemas

  • WebStorm recognizes the schemas key inside datasource blocks, providing highlighting, code completion, and quick documentation.

  • WebStorm supports @@schema reference via a block attribute, including completion and show usages (Ctrl+F7.

    Find/Show usages of schemas

    A dedicated inspection detects missing @@schema attributes and suggests a quick-fix to add them.

    Missing @@schema attribute - inspection and quick-fix
  • For defined schemas, the Rename refactoring is available.

Learn more from the Prisma official website.

Multi-file Prisma schemas

In WebStorm, you can work with Prisma schemas that are split across multiple files, providing completion, documentation, navigation, search, and more.

  • WebStorm supports connection via @relation across files located in the same directory, or in its subdirectories, or in different directories. Newly added relations are reformatted automatically.

  • Multifile schemas located in subdirectories are recognized by npx prisma generate.

  • Code completion and quick documentation is provided for relations and types.

  • You can find the usages of a symbol across the project with Alt+F7.

    Find usages of a model across a split schema

    To jump to the declaration of a symbol, press Ctrl+B.

  • You can view quick documentation for models specified in other .prisma files.

    Quick documentation for models specified in other .prisma files
  • A dedicated inspection detects duplicates of generator and datasource blocks and shows an error in the Problems tool window and in a popup right in the editor on hover.

    Detecting duplicates

Sharding

For Prisma ORM 6.10 and later, WebStorm supports sharding via the @shardKey and @@shardKey attributes, so you can easier scale up when your database load grows.

To work with sharding, make sure to add previewFeatures = ["shardKeys"] to the generator block.

  • Code completion and quick documentation lookup for @shardKey and @@shardKey.

    Quick documentation for @shardKey
  • Completion for fields within the block attribute @@shardKey. Completion list only includes scalar non-nullable fields

    Completion for fields within @@shardKey
  • You can search for usages of fields within @@shardKey block attributes with Alt+F7.

    Find usages of fields within @@shardKey block attributes
  • You can apply the Rename refactoring to fields within @@shardKey block attributes.

01 September 2025