language-tools
language-tools copied to clipboard
Prisma syntax highlighting not active in Markdown preview (VSCode)
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())
}
\```
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 :heart:
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
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.
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...
Yes... 🙈 It's complicated and requires a lot of knowledge & work when a project introduces a new syntax to be supported everywhere!
Linking the issue about highlightjs https://github.com/prisma/prisma/issues/2337