catherinedevlin / ipython-sql

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

colorize failed cells #85

Open catherinedevlin opened 7 years ago

catherinedevlin commented 7 years ago

Syntax colorization of SQL cells only fires after successful execution - not on cells that fail with a SQL error. Colorizing cells with errors would help with fixing those errors.

crawles commented 7 years ago

@catherinedevlin instead of js = "IPython.CodeCell.config_defaults.highlight_modes['magic_sql'] = {'reg':[/^%%sql/]};" try this: js = "IPython.CodeCell.config_defaults.highlight_modes['magic_text/x-sql'] = {'reg':[/^%%sql/]};"

It works for me prior to executing and as you are typing