Need for this project arise of daily work with PySpark scripts that have a lot of sql inside. This project's aim is to enable syntax highlighting for SQL inside Python multiline strings, especially PySpark, using VS Code.
As the extension is in development, installation is only possible manually.
Install node.js and then then install the vsce package:
npm install --global vsce
Clone the repository and open a terminal at the project root and execute the following command:
vsce package
The resulting .vsix
file can be installed via the VSCode GUI.
SQL hilighting starts after keywords SELECT
, INSERT
and CREATE TABLE
at the start of multi-line string.
This project was cloned from Mark Wibrow project python-string-sql, that was was adpated from es6-string-html. Considerable insight into writing the TextMate grammars used by VS Code, can be found in an old blog post by Matt Neuburg.
Currently, only contributors to the Mark's Wibrow's project and me have contributed. If anybody would like to contribute, just create a pull request and/or issue. Thank you!