Highlighting Inline SQL & PRQL for VS Code
Syntax Highlighting for SQL and PRQL in JS template literals in .js/.jsx/.ts/.tsx, Go template literals, Python multi-qutoted/f-strings.
I would like to thank the following projects, which were instrumental in the development of this project:
Thank you to the maintainers and contributors of these projects!
- For PRQL highlighting, you need to install the PRQL extension first
Highlight Inline SQL from the Extensions Marketplace (
ctrl + shift + x or
cmd + shift + x on mac).
Also available on marketplace.visualstudio.com
--begin-sql at the beginning of the part of the string you would like highlighted and a semicolon,
--end-sql at the end of the highlighted section.
For PRQL, Insert
--begin-prql at the beginning of the part of the string you would like highlighted and a semicolon,
--end-prql at the end of the highlighted section.
sql and the autocomplete snippet will appear:
prql for PRQL also.
ctrl+k s (or cmd+k s on macOS) - Insert the following snippet:
For PRQL, the keybinding is: ctrl+k p (or cmd+k p on macOS)