Skip to content

VSCode automatically removes content that has syntax error #325

@ymc9

Description

@ymc9

In VSCode editor with a .zmodel file, past the following:

datasource db {
    provider = 'sqlite'
    url = 'dev.db'
}

model User {
    id Int @id @default(autoincrement())
    username String
    sent Chat[] @relation('sent')
    received Chat[] @relation('received')
}

plugg abc {
    
}

model Chat {
    id Int @id @default(autoincrement())
    subject String
    fromUser User @relation(name: 'sent', fields: [fromUserId], references: [id])
    fromUserId Int
    toUser User @relation(name: 'received', fields: [toUserId], references: [id])
    toUserId Int
}

When saved, the "plugg ABC { ... }" part disappears.

Metadata

Metadata

Assignees

Labels

vscodeVSCode extension related

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions