KSQL VSCode Syntax Highlighting
This provides language support for KSQL - the streaming SQL engine for Apache Kafka.
How to install
From VSCode, go to Extensions (View->Extensions) and search for
KSQL. Click on
You can also download the
vsix file from the Marketplace directly to install it locally.
How to use it
Any file with the extension
.ksql will be automagically detected.
To apply it to any other file, switch the language mode to
KSQL. You can do this one of two ways:
- from the bottom-right of the screen in the status bar, click on the current language name, and change it
- by going to the command palette (Shift-Cmd-P on the Mac) and entering 'Change Language Mode' (or a subset of it; it will auto-complete), select the match, and then type KSQL.
The second option is verbose to explain but much faster if you're a keyboard-warrior 😎
When you install the extension you get a Kafka icon in the activity bar, and you can see the topics, streams and tables in your connected instance. You can refresh the Explorer with Ctrl+Shift+P and choose the
Refresh KSQL Explorer command.
The extension assumes that your KSQL server is at
localhost:8088. If it is not change the endpoint URL in the workspace config.
Get up and start developing straight away
- Open the terminal in the root of the folder and call
F5 to open a new window with this extension loaded.
- open a file with the .ksql extension in the newly openened window.
- Set breakpoints in the code inside
src/KSQLMain.ts to debug the extension.
- Find output from the extension in the debug console of the initial window.
PRs very welcome!
- Differentiate between keywords, datatypes, etc in formatting
- Formatting capabilities
- Line breaks (including line continuation character)
- UPPER CASE on keywords
- Syntax checking