|
1 | | -# Flink-SQL-VsCode |
| 1 | +# Flink-SQL-Checker |
2 | 2 |
|
3 | | -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 and error grammer check. |
| 3 | +This extension provides Flink SQL support for VSCode. Support Flink SQL error grammer check, syntax highlighting, complete keywords, rename and code format, including user-defined functions. |
4 | 4 |
|
5 | 5 |
|
6 | 6 | ## 1.Features |
7 | 7 |
|
8 | | -Support Flink SQL(v1.16.0) syntax highlighting, complete keywords, error grammer check and code format, including user-defined functions |
| 8 | +### 1.1 Grammar Check |
| 9 | +open your `setting.json`, add `"flink-sql-grammar-check.enable": true` or |
| 10 | + |
9 | 11 |
|
10 | | - |
| 12 | +example: |
| 13 | +-  |
| 14 | + |
| 15 | +-  |
| 16 | + |
| 17 | +-  |
| 18 | + |
| 19 | +### 1.2 Rename |
| 20 | + |
| 21 | + |
| 22 | +### 1.3 Code Completion Proposals |
| 23 | + |
11 | 24 |
|
| 25 | +### 1.4 Snippets |
12 | 26 | snippets keywords: |
13 | 27 | - create |
14 | 28 | - select |
15 | 29 | - insert |
16 | 30 |
|
17 | | -## 1.1 How use |
| 31 | + |
| 32 | + |
| 33 | +### 1.5 Code Format |
| 34 | +Select your FlinkSQL code and press ```Alt+Shift+f```. |
| 35 | + |
| 36 | +## 2. User Guide |
18 | 37 | Enable the extension on your file, either name the file with a extension: |
19 | 38 | - SQL |
20 | 39 | - FQL |
21 | 40 |
|
22 | 41 | Or press F1, type 'Change Language Mode', and then choose FlinkSQL. |
23 | 42 |
|
24 | | -### 1.1.1 Format |
25 | | - |
26 | | -Select your FlinkSQL code and press ```Alt+Shift+f```. |
27 | | - |
28 | | -### 1.1.2 Error grammer check |
29 | | -> The feature during experiment. |
30 | | -
|
31 | | -open your `setting.json`, add `"flink-sql-grammar-check.enable": true`。 |
32 | | - |
33 | | -## 1.2 Color theme recommend |
| 43 | +### 2.1 Color theme recommend |
34 | 44 | ~~~json |
35 | 45 | { |
36 | 46 | "workbench.colorTheme": "Default Dark+", |
@@ -165,19 +175,4 @@ open your `setting.json`, add `"flink-sql-grammar-check.enable": true`。 |
165 | 175 | ], |
166 | 176 | } |
167 | 177 | } |
168 | | -~~~ |
169 | | - |
170 | | -## 2. Dev Grammar |
171 | | -- Edit `FlinkSQL.g4` |
172 | | -- Run `npm run antlr4ts` generate for ts code then move to src directory. |
173 | | -- Copy ./gen ts file to src directory |
174 | | - |
175 | | -## 3. Build |
176 | | - |
177 | | -### 3.1 Prerequisites |
178 | | -- npm |
179 | | -- vsce |
180 | | - |
181 | | -### 3.2 Build |
182 | | -- Run ```npm install --dependencies``` to install dependencies. |
183 | | -- Run ```vsce package``` to build extension. |
| 178 | +~~~ |
0 commit comments