Rainbow SQL makes SQL INSERT statements easier to read by coloring each column and its corresponding values consistently. It also helps you inspect columns and spot rows with a mismatched number of values.
Hover over a value to see its column number, name, table, and row position.
Rows whose value count differs from the declared columns are highlighted.
- Matching column and value colors: follow each declared column through one or more
VALUESrows. - Single-row and multi-row statements: supports statements laid out on one line or across multiple lines.
- Column details on hover: inspect the column number, name, table, and row position.
- Active column in the status bar: see the current column while moving through a statement.
- Mismatch detection: identify rows whose value count differs from the declared column count.
- Theme-aware colors: separate palettes for light and dark themes, with customizable colors.
- SQL-aware parsing: handles quoted values, comments, nested expressions, and common identifier quoting styles.
For example, the values are colored to match their corresponding columns:
INSERT INTO items (id, code, price)
VALUES
(101, 'ITEM_A', 19.99),
(102, 'ITEM_B', 24.50);The extension activates for SQL, PostgreSQL, MySQL, PL/SQL, T-SQL, and SQLite language modes.
| Setting | Type | Default | Description |
|---|---|---|---|
rainbowSql.enabled |
boolean |
true |
Enable or disable column highlighting. |
rainbowSql.enableHover |
boolean |
true |
Show column details when hovering over values. |
rainbowSql.enableStatusBar |
boolean |
true |
Show the active column in the status bar. |
rainbowSql.highlightMismatches |
boolean |
true |
Highlight rows with a different number of values than declared columns. |
rainbowSql.darkColors |
string[] |
10 colors | Color palette used with dark themes. |
rainbowSql.lightColors |
string[] |
10 colors | Color palette used with light themes. |
Configure these options in VS Code Settings by searching for Rainbow SQL.
Run Rainbow SQL: Toggle Rainbow SQL Highlighting from the Command Palette to turn highlighting on or off.
If you have a question, find a problem, or would like to suggest an improvement, open an issue on GitHub. For bug reports, include your VS Code version and a small SQL example that demonstrates the issue.
To run the extension from this repository:
- Open the repository in VS Code.
- Press
F5to launch the Extension Development Host. - Open
sample.sqlin the new window.
Run the automated tests with:
npm testGitHub Actions runs the tests and build on pull requests targeting main or v-next, and when changes are pushed to either branch. To publish a release, add a repository Actions secret named VSCE_PAT, then create and publish a GitHub Release with a tag matching the version in package.json (for example, v0.9.0). The release workflow publishes the extension to the Visual Studio Marketplace and attaches the .vsix package to the GitHub Release.


