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

Support for syntax highlighting for Prisma schemas #1598

Open
nikolasburk opened this issue Sep 28, 2020 · 2 comments
Open

Support for syntax highlighting for Prisma schemas #1598

nikolasburk opened this issue Sep 28, 2020 · 2 comments
Labels
enhancement-request A request for an enhancement to be developed.

Comments

@nikolasburk
Copy link

Is your enhancement request related to a problem? Please describe.

Prisma is a database toolkit that comes with its own data modeling language to define the so-called Prisma schema.

Right now, Prisma schemas don't have proper syntax highlighting in dev.to articles because their syntax highlighting is based on rouge.

Describe the solution you'd like

Ideally, dev.to could support the prisma annotation on fenced code blocks to render Prisma schemas more colorful! For example:

```prisma
datasource db {
  url      = env("DATABASE_URL")
  provider = "postgresql"
}
generator client {
  provider = "prisma-client-js"
}
model User {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  email     String   @unique
  name      String?
  role      Role     @default(USER)
  posts     Post[]
}
model Post {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
  published Boolean  @default(false)
  title     String
  author    User?    @relation(fields: [authorId], references: [id])
  authorId  Int?
}
enum Role {
  USER
  ADMIN
}
```

Additional context

This has been enabled on GitHub already (see here).

This is the PR that enabled syntax highlighting for Prisma schemas on GitHub: github-linguist/linguist#4668 (comment)

I also opened a similar issue in the forem/forem repo (which is the source code for dev.to): forem/forem#10467 (comment)

@stale
Copy link

stale bot commented Jan 3, 2022

This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days.
If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.

@stale stale bot added the stale-issue There has been no activity for a year. label Jan 3, 2022
@nikolasburk
Copy link
Author

Commenting so this issue won't be considered stale 🙏

@stale stale bot removed the stale-issue There has been no activity for a year. label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement-request A request for an enhancement to be developed.
Projects
None yet
Development

No branches or pull requests

1 participant