Skip to content

What do you think about Visual Studio Marketplace? We are looking for feedback from developers like you! Take the survey

| Marketplace
Sign in
Visual Studio Code>Programming Languages>PrismaNew to Visual Studio Code? Get it now.

Prisma

Prisma

|
629,264 installs
| (19) | Free
Adds syntax highlighting, formatting, auto-completion, jump-to-definition and linting for .prisma files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Prisma VS Code Extension

Adds syntax highlighting, linting, code completion, formatting, jump-to-definition and more for Prisma Schema files.

Features

  • Syntax highlighting of schema.prisma
  • Linting
    • Diagnostic tools are used to surface errors and warnings in your schema file as you type.
  • Code Completion
    • Completion results appear for symbols as you type.
    • You can trigger this manually with the Ctrl+Space shortcut.
  • Documentation help
    • Documentation of a completion result pops up as completion results are provided.
  • Quick info on hover
    • Documentation Comments (///) of models and enums appear anywhere you hover over their usages.
  • Go to Definition
    • Jump to or peek a model or enum's declaration.
  • Formatting
    • Format code either manually or on save (if configured).
      • To automatically format on save, add the following to your settings.json file:
        "editor.formatOnSave": true
        
      • To enable formatting in combination with prettier, add the following to your settings.json file:
        "[prisma]": {
          "editor.defaultFormatter": "Prisma.prisma"
        },
        
        or use the Prettier plugin for Prisma
  • Rename
    • Rename models, enums, fields and enum values
      • Click into the model or enum, press F2 and then type the new desired name and press Enter
      • All usages will be renamed
      • Automatically applies @map or @@map on the schema
  • Quick-fixes
    • Quickly fix typos in model and enum names
    • Create new models and enums with a single click

Preview

Syntax-Highlighting

Syntax highlighting eases visual comprehension of the Prisma schema. Preview Schema

Formatting

Formatting ensures consistent indentation of your models for better readability. Formatting

Linting and autocompletion

Linting shows inline errors in the schema, and autocompletion assists in defining the correct type. Linting and autocompletion

Contextual suggestions

Contextual suggestions assist in defining field types, models, and relations while formatting automatically defines back relations. Contextual suggestions

Jump-to-definition

Easily navigate definitions, i.e. models in the Prisma schema.

Jump-to-definition

Contributing

Read more about how to contribute to the Prisma VSCode extension

Telemetry

This extension collects telemetry data to help us better the usage of the extension. You can read more about that in Prisma's documentation . The extension respects the telemetry.enableTelemetry setting in VSCode. If you want to opt out of telemetry, set "telemetry.enableTelemetry": false in your VSCode settings.

Build information

This is for Prisma CLI 4.9.0.

Security

If you have a security issue to report, please contact us at security@prisma.io

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft