I am building an IPython cell magic to support interactive SQL queries and want the syntax highlighting of that cell to change from Python to SQL. What is the best way to achieve this?
Imagine an input cell of the following:
%%sqlite example.db
SELECT id,name FROM Users;
Currently, the query is parsed as Python code, with messy results.
In particular, is the language
parameter of the Notebook format supported? None of the cell magics supported by the official documentation (R, Ruby, Octave, ..) seem to bother changing it from "python"
.