catherinedevlin / ipython-sql

%%sql magic for IPython, hopefully evolving into full SQL client
MIT License
1.79k stars 369 forks source link

Enable syntax highlighting #214

Open rschroll opened 2 years ago

rschroll commented 2 years ago

I went to see about adding this and saw that there was already some code to do this. It was commented out, and a comment suggests that this was related to an API change within Jupyter itself (https://github.com/catherinedevlin/ipython-sql/commit/1a754661354c7339b7bea1c6b6c13324b110d03f). I've tried to write it in a way that works with both the old and newer APIs, but I've only tested on notebook 6.4.11.

This does not work with JupyterLab, which seems to make this more difficult, likely requiring an extension.