Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ITyukz11 opened this issue May 10, 2024 · 2 comments
Labels
bug/2-confirmed Bug has been reproduced and confirmed. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/bug A reported bug. topic: syntax highlighting topic: vscode

Comments

@ITyukz11
Copy link

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

@Jolg42
Copy link
Contributor

Jolg42 commented May 13, 2024

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
Copy link
Contributor

Jolg42 commented May 13, 2024

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

@Jolg42 Jolg42 added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: vscode topic: syntax highlighting domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. labels May 13, 2024
@Jolg42 Jolg42 changed the title Syntax Highlighting in Prisma Enum not working? Syntax Highlighting breaks for Enum when there is no space between the enum's name and the curly { May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/bug A reported bug. topic: syntax highlighting topic: vscode
Projects
None yet
Development

No branches or pull requests

2 participants