You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-20Lines changed: 26 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,11 @@
1
1
# Flink-SQL-VsCode
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.
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.
4
4
5
-
## Build
6
5
7
-
### Prerequisites
6
+
##1.Features
8
7
9
-
- npm
10
-
- vsce
11
-
12
-
### Build
13
-
14
-
- Run ```npm install --dependencies``` to install dependencies.
15
-
- Run ```vsce package``` to build extension.
16
-
17
-
## Features
18
-
19
-
Enables syntax highlighting, complete keywords, and code format for Flink SQL(v1.16.0), including user-defined functions.
8
+
Enables syntax highlighting, complete keywords, error grammer check, and code format for Flink SQL(v1.16.0), including user-defined functions.
20
9
21
10

22
11
@@ -25,18 +14,23 @@ snippets keywords:
25
14
- select
26
15
- insert
27
16
28
-
## How use
17
+
## 1.1 How use
29
18
Enable the extension on your file, either name the file with a extension:
30
19
- SQL
31
20
- FQL
32
21
33
22
Or press F1, type 'Change Language Mode', and then choose FlinkSQL.
34
23
35
-
### Format
24
+
### 1.1.1 Format
36
25
37
26
Select your FlinkSQL code and press ```Alt+Shift+f```.
38
27
39
-
## Color theme recommend
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
40
34
~~~json
41
35
{
42
36
"workbench.colorTheme": "Default Dark+",
@@ -173,6 +167,18 @@ Select your FlinkSQL code and press ```Alt+Shift+f```.
173
167
}
174
168
~~~
175
169
176
-
## TODO List
177
-
- Support grammer:`Conditional Functions`:`CASE value WHEN value1_1 [, value1_2]* THEN RESULT1 (WHEN value2_1 [, value2_2 ]* THEN result_2)* (ELSE result_z) END`
178
-
- Error grammer highlight
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.
0 commit comments