Skip to content

Commit 632ce8b

Browse files
committed
Feat: code format
1 parent 8ebed77 commit 632ce8b

5 files changed

Lines changed: 353 additions & 4 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*.vsix
2+
node_modules
3+
.vscode

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
This extension provides Flink SQL support for VSCode. It also provides some basic code snippets for operations such as creating a table, altering a table, or renaming columns.
44

5+
## Build
6+
7+
### Prerequisites
8+
9+
- npm
10+
- vsce
11+
12+
### Build
13+
14+
- Run ```npm install --dependencies``` to install dependencies.
15+
- Run ```vsce package``` to build extension.
516

617
## Features
718

8-
Enables syntax highlighting and complete keywords for Flink SQL(v1.16.0), including user-defined functions.
19+
Enables syntax highlighting, complete keywords, and code format for Flink SQL(v1.16.0), including user-defined functions.
920

1021
![](images/flink-sql-vscode-snippets.gif)
1122

@@ -21,6 +32,9 @@ Enable the extension on your file, either name the file with a extension:
2132

2233
Or press F1, type 'Change Language Mode', and then choose FlinkSQL.
2334

35+
### Format
36+
37+
Select your FlinkSQL code and press ```Alt+Shift+f```.
2438

2539
## Color theme recommend
2640
~~~json

package-lock.json

Lines changed: 297 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
},
2424
"homepage": "https://github.com/camilesing/flink-sql-vscode/master/README.md",
2525
"categories": [
26-
"Programming Languages"
26+
"Programming Languages", "Formatters"
2727
],
2828
"keywords": [
29-
"Flink SQL", "Flink"
29+
"Flink SQL", "Flink", "Formatter"
3030
],
3131
"preview": false,
3232
"contributes": {
3333
"languages": [{
3434
"id": "flink-sql",
35-
"aliases": ["FlinkSQL", "flink-sql", "Flink SQL"],
35+
"aliases": ["FlinkSQL", "flink-sql", "Flink SQL","fql"],
3636
"extensions": [".sql", ".fql"],
3737
"configuration": "./language-configuration.json"
3838
}],
@@ -47,5 +47,13 @@
4747
"path": "./snippets/flink-sql.json"
4848
}
4949
]
50+
},
51+
"activationEvents": [
52+
"onLanguage:sql",
53+
"onLanguage:flink-sql"
54+
],
55+
"main": "./src/extension.js",
56+
"dependencies": {
57+
"sql-formatter-plus": "^1.3.6"
5058
}
5159
}

0 commit comments

Comments
 (0)