feat: add SQL syntax highlighting in query editor

This commit is contained in:
Valdemar Lorenzen
2026-10-19 14:16:04 +02:00
parent 49a3dbddcf
commit dbd4c05cf4
7 changed files with 285 additions and 11 deletions
+3
View File
@@ -1,6 +1,7 @@
mod app;
mod connection;
mod db;
mod sql;
use std::{error::Error, io::IsTerminal, path::Path, process::ExitCode};
@@ -45,6 +46,8 @@ Navigation:
appears in the rows/schema border. Read errors appear above the query editor.
In the query editor, type SQL directly; Enter inserts a newline. Arrow keys,
Home/End, Backspace/Delete, Ctrl-U (clear), and multiline pasting are supported.
SQL syntax colors follow the connected database's PostgreSQL/SQLite dialect,
including quoted identifiers, literals, and multiline comments/strings as you type.
F5 / Ctrl-Enter executes one SELECT/CTE on the current connection, showing up
to 100 rows below. Results report truncation; use SQL LIMIT/OFFSET for more.
Failed queries keep the previous results. Opening a relation restores browsing