https://github.com/snowflake-labs/vscode-snowsql-formatter
VS Code Plugin to format snowsql specific code
https://github.com/snowflake-labs/vscode-snowsql-formatter
Last synced: 8 months ago
JSON representation
VS Code Plugin to format snowsql specific code
- Host: GitHub
- URL: https://github.com/snowflake-labs/vscode-snowsql-formatter
- Owner: Snowflake-Labs
- Created: 2021-05-03T08:58:13.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-31T17:02:18.000Z (about 2 years ago)
- Last Synced: 2025-09-26T16:37:02.154Z (8 months ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Snowflake SQL Formatter
Format SQL files using the [snowsql-formatter](https://github.com/Snowflake-Labs/snowsql-formatter) npm package. This plugin is a clone of the [vscode-sql-formatter](https://github.com/kufii/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
```bash
# 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:
