Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add prisma support #1211

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ Polly
Pony
PostCss
PowerShell
Prisma
Processing
Prolog
Protobuf
Expand Down
6 changes: 6 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,12 @@
"multi_line_comments": [["/*", "*/"]],
"extensions": ["p", "pro"]
},
"Prisma": {
"line_comment": ["//"],
"quotes": [["\\\"", "\\\""]],
"multi_line_comments": [["/*", "*/"]],
"extensions": ["prisma"]
},
"PSL": {
"name": "PSL Assertion",
"line_comment": ["//"],
Expand Down
24 changes: 24 additions & 0 deletions tests/data/prisma.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// 24 lines, 18 code, 2 comments, 4 blanks

// Prisma schema file
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl"]
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model Notification {
id Int @id @default(autoincrement())
title String
message String
}

model User {
id Int @id @default(autoincrement())
name String
email String
}