A Language Server Protocol implementation for SQLite — so your editor can tell you about your broken SQL before you find out the hard way.
Uses modernc.org/sqlite (a pure-Go SQLite) as the parser, which means validation comes from SQLite's own Prepare — not a third-party grammar that kinda-sorta matches. If SQLite would reject it, so will this.
- Syntax validation via SQLite's actual parser — catches errors at the statement level, with line and column positions
- Schema-aware validation — point it at a
.dbfile and get diagnostics for missing tables, nonexistent columns, type mismatches - Multi-statement support — handles semicolons in strings, comments, and other places that trip up naïve splitters
- Cross-platform — builds for macOS, Linux, and Windows on amd64 and arm64
brew install toba/tap/sqlite-lsp
scoop bucket add toba https://github.com/toba/scoop-bucket
scoop install sqlite-lsp
go install github.com/toba/sqlite-lsp/cmd/sqlite-lsp@latest
Grab a binary from Releases.
Install the sqlite-lsp extension from the Extensions panel — search for "sqlite-lsp" and click Install.
The server spins up an in-memory SQLite database and runs Prepare against each statement. Syntax errors come back with the token that SQLite choked on and its position in your source. For schema validation, it opens your database file read-only and does the same thing — so you get real "no such table" and "no such column" errors, not guesses.
Statement splitting handles the usual hazards: semicolons inside string literals, line comments, block comments, escaped quotes. It's not a full tokenizer, but it covers the cases that actually come up.