language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Syntax highlighting support for `Prisma.sql` in prisma vscode extension

Open andreasvh-conceto opened this issue 1 year ago • 0 comments

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: prisma_sql_without_highlighting

How it is working with $queryRaw, but NOT with Prisma.sql. For Prisma.sql i expect the same prisma_query_raw_highlighting

andreasvh-conceto avatar Sep 09 '23 11:09 andreasvh-conceto