prisma / language-tools

🌐 Prisma Language Tools = Language Server and Prisma's VS Code extension.
https://marketplace.visualstudio.com/items?itemName=Prisma.prisma
Apache License 2.0
253 stars 36 forks source link

Syntax Highlighting breaks for Enum when there is no space between the enum's name and the curly `{` #1723

Open ITyukz11 opened 3 months ago

ITyukz11 commented 3 months ago

![image](https://github.co syntax enum error m/prisma/language-tools/assets/138852354/5652b33d-4261-432c-b4ca-15befd2e1cce)

Jolg42 commented 3 months ago

I think the problem is that the syntax highlighting requires a space between the enum's name and the {

See broken

enum UserType{
    ADMIN
    NORMAL
}

works

enum UserType {
    ADMIN
    NORMAL
}
Jolg42 commented 3 months ago

Usually auto-formatting would fix this, with the CLI you can use npx prisma format manually.

Note: the syntax is defined here -> https://github.com/prisma/language-tools/blob/main/packages/vscode/syntaxes/prisma.tmLanguage.json