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.
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.
# Install dependencies
yarn install
# login into VS Code extension publish registry
vsce login
# Build a vscode plugin
# vsce package
vsce package --yarn --skip-license; code --force --install-extension vscode-snowsql-formatter-with-py-1.4.5.vsixThe build process should produce a VSIX file. We can then simply go to VSCode -> Extensions -> Install from VSIX as shown in the image below:
