gabrielcolson / intellij-prisma

Prisma Schema Language support for WebStorm, GoLand, and other IDEs based on IntelliJ Platform.
https://plugins.jetbrains.com/plugin/14240-prisma
42 stars 9 forks source link

Column named "type" shown as error #9

Closed ghidoras closed 4 years ago

ghidoras commented 4 years ago

First of all thanks for your effort :)

I have a model as follows:

model ReportComment {
    id String @id @default(cuid())

    body String

    report Report @relation(fields: [reportId], references: [id])
    reportId String

    type String // "GENERAL_FEEDBACK" | "PRIVATE_COMMENT"
    visibleByActorType String // "ALL" | "EDITOR" | "REVIEWER"

    createdAt DateTime @default(now())
    updatedAt DateTime @default(now())
}

and the column type is highlighted as an error:

Screenshot 2020-05-23 at 12 34 12

The issue was not there before updating to latest version.

gabrielcolson commented 4 years ago

Thanks for letting me know. I will fix this ASAP

steebchen commented 4 years ago

I also have this issue; it's a bit annoying because it's a hard error in IJ and most of the other syntax highlighting will fail with this error.

gabrielcolson commented 4 years ago

Hey @steebchen I didn't have time to work on this recently but I will do it this week for sure.

BinaryFissionGames commented 4 years ago

@gabrielcolson - I've been annoyed by this issue for a few day now, so I went ahead and tried to have a go at fixing this myself; I've submitted a pull request, feel free to review when you get the chance!

gabrielcolson commented 4 years ago

Hey, @Denu8thell thanks for the fix! I thought this issue would be solved by using the official Prisma Language Server (see #10), but it was harder than I thought and I didn't find any trivial way of doing it.

Anyway now it's fixed thanks to you! I will submit a new release to JetBrains today :D