Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>IBM Embedded SQL C PrettierNew to Visual Studio Code? Get it now.
IBM Embedded SQL C Prettier

IBM Embedded SQL C Prettier

wy.an

|
1 install
| (0) | Free
Formats IBM Embedded SQL for C files (.sqc) with a lightweight formatter tuned for EXEC SQL statements.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Embedded SQL C Prettier

This workspace contains a minimal VS Code extension that formats IBM Embedded SQL statements inside C files (.sqc, .sqx) using a lightweight custom formatter.

Author: wy.an

Features

  • Maps .sqc, .sqC, .sqx to C language so C/C++ IntelliSense, hover, and Go to Definition keep working
  • Applies SQL grammar (source.sql) via injection inside EXEC SQL ...; blocks for SQL token coloring
  • Runs C formatting first (via clang-format by default), then applies SQL clause indentation for EXEC SQL blocks
  • Supports Format Document and Format Selection
  • Shows an SQC status-bar badge when the active editor is an .sqc/.sqx file
  • Adds an SQC file decoration badge for .sqc/.sqx files in the Explorer

Formatter configuration

  • embeddedSqlCPrettier.cFormatterCommand (default: clang-format)
  • embeddedSqlCPrettier.cFormatterArgs (default: ["-style={BasedOnStyle: LLVM, IndentWidth: 4, ColumnLimit: 0}"])

If clang-format is not available in PATH, the extension automatically probes common Windows install paths (LLVM and Visual Studio LLVM toolchains) before falling back to SQL-only formatting.

Run in VS Code

  1. Open this folder in VS Code.
  2. Press F5 to run the extension in a new Extension Development Host window.
  3. Open a .sqc file.
  4. Use Format Document or Format Selection.

Build a VSIX package

  1. Install dependencies:
    • npm install
  2. Build the extension package:
    • npm run package:vsix
  3. Install locally for testing:
    • code --install-extension .\\embedded-sql-c-prettier-0.1.0.vsix

Publish to Visual Studio Marketplace

  1. Update package.json:
    • change publisher from local to your real publisher id
    • bump version as needed
  2. Create a Marketplace publisher (one-time) in Visual Studio Marketplace.
  3. Create an Azure DevOps PAT with Marketplace (Manage) permission.
  4. Login with vsce:
    • npx vsce login <your-publisher-id>
  5. Publish:
    • npm run publish:marketplace
    • or auto bump: npx vsce publish patch

Recommended Marketplace content checklist

  • Keep README.md updated with:
    • key features
    • settings (embeddedSqlCPrettier.*)
    • known limitations and behavior
  • Update CHANGELOG.md each release
  • Keep a clear license in LICENSE

Notes

This formatter is intentionally lightweight. It focuses on practical EXEC SQL readability: SQL keyword highlighting via grammar injection and clause-oriented indentation that keeps C nesting intact.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft