language-tools
language-tools copied to clipboard
Syntax highlighting support for `Prisma.sql` in prisma vscode extension
Problem
With the prisma vs code plugin syntax highlighting is working for queryRaw queries.
await this.prisma.$queryRaw`SELECT id,name FROM person WHERE name='john'`;
In my last couple of projects i also had to construct more complex queries with Prisma.sql
. Currently there is no syntax hightlighting available.
const query: Prisma.Sql = Prisma.sql`SELECT id,name FROM person WHERE name='john'`;
//... do some other complex stuff i.e. appending additional where conditions
await prisma.$queryRaw(query);
Suggested solution
Syntax highlighting should happen also for Prisma.sql method, not only for $queryRaw.
Alternatives
No alternative available. I have to focus myself everytime without syntax hightlighting. See my screenshots
Additional context
How it is currently with Prisma.sql:
How it is working with $queryRaw, but NOT with Prisma.sql. For Prisma.sql i expect the same