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

Prisma syntax highlighting not active in Markdown preview (VSCode) #1401

Open
AjaniBilby opened this issue Apr 14, 2023 · 4 comments
Open

Prisma syntax highlighting not active in Markdown preview (VSCode) #1401

AjaniBilby opened this issue Apr 14, 2023 · 4 comments
Labels
kind/feature A request for a new feature. team/schema Issue for team Schema. topic: syntax highlighting topic: vscode

Comments

@AjaniBilby
Copy link

Bug description

Syntax highlighting for Prisma in Markdown documents in VSCode only highlighting in editor and not in preview

How to reproduce

## Database layout

\```prisma
model Thing {
	id Int @id @default(autoincrement())
}
\```

image

Note: I did also try disabling my other markdown extensions such as the Github theming one to see if they were interfering and they are not.
I would like to be able to use Prisma notation for documentation ❤️

Expected behavior

The syntax highlighting present in the syntax highlighted markdown should also be present in the markdown preview.

Environment & setup

  • OS: Microsoft Windows [Version 10.0.22621.1555] (Win 11)
  • Editor: VSCode
  • Editor version: 1.77.3
  • Extension version: Prisma v4.12.0
@Jolg42 Jolg42 added kind/feature A request for a new feature. topic: vscode team/schema Issue for team Schema. topic: syntax highlighting labels Apr 26, 2023
@Jolg42
Copy link
Member

Jolg42 commented Apr 26, 2023

Hi @AjaniBilby !

I think this is because VS Code uses highlight.js for the markdown preview and Prisma is not supported there yet:
https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md

So it looks like someone would need to check how to add support for Prisma in highlightjs one day.

@AjaniBilby
Copy link
Author

That's a good point, it's a shame we can't have a standard for representing syntax highlighting...
If you want highlighting in an IDE, use textmate's standard, prebuilt documentation is often pygments, but if you want dynamic highlighting in the web then it's highlight.js's...

@Jolg42
Copy link
Member

Jolg42 commented Apr 26, 2023

Yes... 🙈 It's complicated and requires a lot of knowledge & work when a project introduces a new syntax to be supported everywhere!

@Jolg42
Copy link
Member

Jolg42 commented Apr 26, 2023

Linking the issue about highlightjs prisma/prisma#2337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for a new feature. team/schema Issue for team Schema. topic: syntax highlighting topic: vscode
Projects
None yet
Development

No branches or pull requests

2 participants