Skip to content

Commit

Permalink
update docs. release v1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
camilesing committed Jul 16, 2023
1 parent 941373b commit bf09cd7
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 39 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### v1.7.1
- Feature: Grammar check be optional features from experiment.

### v1.6.0
- Support:
- show reference and count.
Expand All @@ -8,7 +11,7 @@
### v1.5.3
- Fix check semicolon bug.
### v1.5.2
- Add experiment feature: Error grammer check.
- Add experiment feature: Error grammar check.
### v1.4.0
- Support code format.
### v1.3.0
Expand Down
57 changes: 26 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,46 @@
# Flink-SQL-VsCode
# Flink-SQL-Checker

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.
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.


## 1.Features

Support Flink SQL(v1.16.0) syntax highlighting, complete keywords, error grammer check and code format, including user-defined functions
### 1.1 Grammar Check
open your `setting.json`, add `"flink-sql-grammar-check.enable": true` or
![](images/open-setting.jpg)

![](images/flink-sql-vscode-snippets.gif)
example:
- ![](images/expect-semicolon.jpg)

- ![](images/select-not-expect-comma.jpg)

- ![](images/unexpect-input.jpg)

### 1.2 Rename
![](images/rename.gif)

### 1.3 Code Completion Proposals
![](images/code-completion-proposal.gif)

### 1.4 Snippets
snippets keywords:
- create
- select
- insert

## 1.1 How use
![](images/flink-sql-vscode-snippets.gif)

### 1.5 Code Format
Select your FlinkSQL code and press ```Alt+Shift+f```.

## 2. User Guide
Enable the extension on your file, either name the file with a extension:
- SQL
- FQL

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

### 1.1.1 Format

Select your FlinkSQL code and press ```Alt+Shift+f```.

### 1.1.2 Error grammer check
> The feature during experiment.
open your `setting.json`, add `"flink-sql-grammar-check.enable": true`

## 1.2 Color theme recommend
### 2.1 Color theme recommend
~~~json
{
"workbench.colorTheme": "Default Dark+",
Expand Down Expand Up @@ -165,19 +175,4 @@ open your `setting.json`, add `"flink-sql-grammar-check.enable": true`。
],
}
}
~~~

## 2. Dev Grammar
- Edit `FlinkSQL.g4`
- Run `npm run antlr4ts` generate for ts code then move to src directory.
- Copy ./gen ts file to src directory

## 3. Build

### 3.1 Prerequisites
- npm
- vsce

### 3.2 Build
- Run ```npm install --dependencies``` to install dependencies.
- Run ```vsce package``` to build extension.
~~~
13 changes: 13 additions & 0 deletions docs/Develop Guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 1 Prerequisites
- npm
- vsce

# 2. Build
- Run ```npm install --dependencies``` to install dependencies.
- Run ```vsce package``` to build extension.


# 3. If you want add or update grammar rule
- Edit `FlinkSQL.g4`
- Run `npm run antlr4ts` generate for ts code then move to src directory.
- Copy ./gen ts file to src directory
Binary file added images/code-completion-proposal.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/expect-semicolon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/open-setting.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/rename.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-not-expect-comma.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/unexpect-input.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion out/extension.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/extension.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "flink-sql",
"version": "1.6.0",
"displayName": "Flink SQL",
"description": "Support Flink SQL syntax highlighting, complete keywords, error grammer check and code format, including user-defined functions",
"version": "1.7.1",
"displayName": "Flink SQL Checker",
"description": "Support Flink SQL grammar check, syntax highlighting, complete keywords, rename and code format, including user-defined functions",
"publisher": "CamileSing",
"author": {
"name": "CamileSing",
Expand Down

0 comments on commit bf09cd7

Please sign in to comment.