Skip to content

Repository files navigation

@tusk/sql-editor

Minimal SQL editor for Tusk. Hand-rolled tokenizer (no regex — Perry AOT constraint), per-line colorized rendering on top of perry/ui.

No autocomplete or LSP integration in v1.

Install

bun add @tusk/sql-editor
# or, when developing alongside Tusk:# "@tusk/sql-editor": "file:../tusk-sql-editor"

Usage

import{SqlEditor}from'@tusk/sql-editor';const{ handle, api }=SqlEditor({initialText: 'SELECT * FROM users LIMIT 100',onRun(sql){/* … */},onCancel(){/* … */},});

Status

Pre-D3: placeholder widget that renders the SQL text inline. Real multiline editor with token highlighting, ⌘↩ to run, and ⌘. to cancel land in milestone D3 of the Tusk plan.

License

MIT.

About

Minimal SQL editor for Tusk — hand-rolled tokenizer, colorized rendering on perry/ui.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages