Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Sleek SQL Formatter - Database Query BeautifierNew to Visual Studio Code? Get it now.
Sleek SQL Formatter - Database Query Beautifier

Sleek SQL Formatter - Database Query Beautifier

Lucent Enterprises Ltd

|
67 installs
| (1) | Free
Format and beautify SQL files with Sleek CLI - supports MySQL, PostgreSQL, SQLite, Oracle, MSSQL with customizable indentation and styling
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Sleek SQL Formatter

A VSCode extension that formats SQL files using the Sleek CLI tool.

Features

  • Format SQL documents with Shift+Alt+F
  • Format SQL selections
  • Check formatting status
  • Status bar indicator showing format status
  • Configurable options for indentation, casing, and spacing
  • Format on save/paste (optional)
  • Automatic CLI download - downloads Sleek CLI automatically if not found
  • Auto-update checking - checks for Sleek CLI updates every 24 hours
  • Version management - view current version and update notifications

Requirements

The extension will automatically download the Sleek CLI tool when needed.

Alternatively, you can install it manually:

cargo install sleek

Usage

  1. Open a .sql file
  2. Press Shift+Alt+F to format (extension will download Sleek CLI if needed)
  3. Or use Command Palette → "Sleek: Format Document"

Configuration

Available settings in VSCode preferences:

  • sleek.executable - Path to sleek executable (default: "sleek")
  • sleek.indentSpaces - Number of spaces for indentation (default: 4)
  • sleek.uppercase - Convert keywords to UPPERCASE (default: true)
  • sleek.linesBetweenQueries - Line breaks between queries (default: 2)
  • sleek.trailingNewline - Add trailing newline (default: false)
  • sleek.formatOnSave - Auto-format on save (default: false)
  • sleek.formatOnPaste - Auto-format on paste (default: false)

Commands

  • Sleek: Format Document - Format entire SQL file
  • Sleek: Format Selection - Format selected SQL text
  • Sleek: Check Formatting - Check if SQL is properly formatted
  • Sleek: Download CLI - Manually download/update Sleek CLI
  • Sleek: Check for Updates - Check for available CLI updates
  • Sleek: Show Version Info - Display current Sleek CLI version

Example

Before:

select id, name from users where status = 'active'

After:

SELECT
    id,
    name
FROM
    users
WHERE
    STATUS = 'active'

License

MIT


Contributing? For development, CI/CD, and testing details, see the project releases guide.

Development

To build and test the extension locally:

npm install
npm run compile      # Build the extension
npm test             # Run tests
npm run tdd          # Watch mode for tests
  • Source: src/
  • Tests: src/*.test.ts
  • Build output: out/
  • Package: npm run package (creates .vsix file for manual install or publishing)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft