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

VSCode extension confusingly "supports" string interpolation

Open Jet132 opened this issue 4 years ago • 2 comments

Previously mentioned in an issue the prisma repo

Bug description

The VSCode Prisma extension "correctly" highlights string interpolation and sees it as correct even though PSL currently does not support this feature.

image

How to reproduce

  1. Create a schema.prisma file
  2. Insert the following code:
    datasource db {
        provider = "postgresql"
        url      = "prefix${env("DATABASE_URL")}postfix"
    }
    

Expected behavior

It should interpret it as a normal part of the string and throw an error because of the unescaped ".

Prisma information

Prisma version: 2.20.1

Environment & setup

  • OS: Windows
  • Editor: VSCode
  • Editor version: 1.55.1
  • Extension version: v2.20.1

Jet132 avatar Apr 13 '21 08:04 Jet132

Can confirm, something to do about this syntax probably https://github.com/prisma/language-tools/blob/214040dd8b7f6cdf47204717d61622330c05d0f7/packages/vscode/syntaxes/prisma.tmLanguage.json#L414:L437

Jolg42 avatar Mar 15 '22 15:03 Jolg42

Reproducing this on VSCode 1.72 & Prisma v4.4.0 led to the following: image image

Druue avatar Oct 17 '22 11:10 Druue