Skip to content

Snowflake-Labs/vscode-snowsql-formatter

Repository files navigation

Snowflake SQL Formatter

Format SQL files using the snowsql-formatter npm package. This plugin is a clone of the vscode-sql-formatter with some snowflake specific changes added on.

Configuration

sql-formatter.dialect: Changes which dialect to format with (sql: Standard SQL, n1ql: Couchbase N1QL, db2: IBM DB2, pl/sql: Oracle PL/SQL). Defaults to sql.

sql-formatter.uppercase: Convert keywords to uppercase. Defaults to false.

sql-formatter.linesBetweenQueries: Number of linebreaks between queries. Defaults to 2.

Testing

Generate VSIX file

# Install dependencies
yarn install

# login into VS Code extension publish registry
vsce login

# Build a vscode plugin
vsce package

Install VSIX into VS Code

The build process should produce a VSIX file. We can then simply go to VSCode -> Extensions -> Install from VSIX as shown in the image below:

image

About

VS Code Plugin to format snowsql specific code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published