I am switching over from atom to VSCode and finding it to be a way better experience for (mostly) python.
One thing I can't seem to work out is that the python syntax highlighting on atom recognised SQL in strings and highlighted it.
I can't seem to find an extension for VSCode to do the same thing.
Does one exist or is there a way to get this highlighting in VSCode?
The best solution I found so far is this extension: https://github.com/ptweir/python-string-sql
It highlights multi quoted strings that start with --sql
and end with ;
, such as this one:
query = f"""--sql
SELECT * FROM mytable;
"""
Unfortunately, this doesn't seem possible yet. But vote here: https://github.com/MagicStack/MagicPython/issues/27
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With