Language support for SUQABASE DDK schema files (.ddk).
Features
- Syntax highlighting — models, enums, fields, types, attributes (
@id,@unique,@default, etc.) - Code completion — keywords, types, attributes, decorators (
@@index,@@map, etc.) - Real-time diagnostics — parse errors, semantic errors, validation warnings
- Hover info — type and attribute information on hover
- Document symbols — structured outline of models, enums, and fields
Requirements
The LSP server (ddk-lsp) must be built from the Rust workspace:
cargo build -p ddk-lsp
The extension automatically finds the binary in target/release/ or target/debug/ of the workspace root.
Usage
- Open any
.ddkfile - Syntax highlighting activates immediately
- LSP features (completions, diagnostics, hover) start automatically when the
ddk-lspbinary is found
Commands
DDK: Open LSP Output— opens the LSP output channel for debugging
Settings
| Setting | Default | Description |
|---|---|---|
ddk.lsp.path |
"" |
Custom path to ddk-lsp binary |
ddk.lsp.trace |
"off" |
LSP trace level (off, messages, verbose) |
Examples
/// User model
model User {
id Int @id @default(autoincrement())
email String @unique @format(email)
name String @min(2) @max(100)
role Role @default(USER)
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
@@index([email, role])
@@map("users")
}
enum Role {
USER
ADMIN
}
model Post {
id Int @id @default(autoincrement())
title String @max(200)
content Text?
published Boolean @default(false)
authorId Int
author User @relation(authorId)
createdAt DateTime @default(now())
@@index([authorId])
}
License
MIT