This repository has been archived by the owner on Jul 6, 2022. It is now read-only.
forked from sql-formatter-org/sql-formatter
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from inferrinizzard/repo/vscode
Add VSCode Extension as subrepo, #44
- Loading branch information
Showing
18 changed files
with
3,045 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
/lib | ||
/dist | ||
/coverage | ||
/vscode | ||
webpack.*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: VSCode Bug Report | ||
about: Raise an issue with the VSCODE Extension | ||
title: '[VSCODE] Issue Title Here' | ||
labels: bug | ||
assignees: '' | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Usage** | ||
|
||
- What SQL language(s) does this apply to? (Plese check the bottom right of your editor for the current VSCode language type) | ||
- What VSCode version are you using? | ||
- What are your currently configured VSCode settings for the `prettier-sql` extension, if relevant to the issue? | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
out/ | ||
.vscode-test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": ["--extensionDevelopmentPath=${workspaceFolder}"], | ||
"outFiles": ["${workspaceFolder}/out/**/*.js"], | ||
"preLaunchTask": "${defaultBuildTask}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": false // set this to true to hide the "out" folder with the compiled JS files | ||
}, | ||
"search.exclude": { | ||
"out": true // set this to false to include "out" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/test/** | ||
src/** | ||
|
||
.gitignore | ||
.yarnrc | ||
**/tsconfig.json | ||
**/.eslintrc.json | ||
**/*.map | ||
**/*.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--ignore-engines true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# CHANGELOG | ||
|
||
## [0.1.0] - 2021/11/23 | ||
|
||
- added wrapper for `prettier-sql` | ||
- added VSCode settings for all configs present in v5 release | ||
- added `prettier-sql` icon | ||
- added formatProvider support on the following file languages: | ||
- sql | ||
- plsql | ||
- mysql | ||
- postgres | ||
- hive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016-2020 ZeroTurnaround LLC | ||
Copyright (c) 2020-2021 George Leslie-Waksman and other contributors | ||
Copyright (c) 2021-Present inferrinizzard and other contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Prettier SQL | ||
|
||
Formats SQL files using the [`prettier-sql`](https://github.com/inferrinizzard/prettier-sql) library | ||
|
||
## Issues | ||
|
||
Please report issues here: https://github.com/inferrinizzard/prettier-sql/issues | ||
|
||
Use the FORMATTING template if it is an issue related the formatting of the SQL, otherwise, please use the VSCODE template for issues with running the VSCode Extension | ||
|
||
## Configuration | ||
|
||
`Prettier-SQL.uppercaseKeywords`: Whether to print keywords in ALL CAPS or lowercase | ||
|
||
`Prettier-SQL.keywordPosition`: Switched between standard keyword positioning vs maintaining a central space column | ||
|
||
`Prettier-SQL.breakBeforeBooleanOperator`: Whether to break before or after AND and OR | ||
|
||
`Prettier-SQL.aliasAS`: Where to use AS in column or table aliases | ||
|
||
`Prettier-SQL.tabulateAlias`: Whether to right-align aliases to the longest line in the SELECT clause | ||
|
||
`Prettier-SQL.commaPosition`: Where to place commas for SELECT and GROUP BY clauses | ||
|
||
`Prettier-SQL.keywordNewline`: Rule for when to break keyword clauses onto a newline | ||
|
||
`Prettier-SQL.itemCount`: Number of items before keyword breaks onto newline (only used when `Prettier-SQL.keywordNewline` is itemCount or hybrid) | ||
|
||
`Prettier-SQL.openParenNewline`: Whether to place (, Open Paren, CASE on newline when creating a new block | ||
|
||
`Prettier-SQL.closeParenNewline`: Whether to place ), Close Paren, END on newline when closing a block | ||
|
||
`Prettier-SQL.lineWidth`: Number of characters allowed in each line before breaking | ||
|
||
`Prettier-SQL.linesBetweenStatements`: How many newlines to place between each query / statement | ||
|
||
`Prettier-SQL.denseOperators`: Whether to strip whitespace around operators such as + or >= | ||
|
||
`Prettier-SQL.semicolonNewline`: Whether to place semicolon on its own line or on previous line |
Oops, something went wrong.