You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using PyQ with python in jupyter notebook, all cells use syntax highlighting of Python by default. This makes q code written in cells starting with %%q very confusing (suppose you use ' somewhere, and all code following it is highlighted as string in python). Hence, I wonder if someone knows some way to use q syntax highlighting in cells starting with %%q.
I find a similar question on stackoverflow. There is an answer about SQL. They say adding the following code in ~/.jupyter/custom/custom.js to use SQL syntax highlighting in cells starting with %%sql.
This can be added either in ~/.jupyter/custom/custom.js or in a cell started with magic %%javascript. However, it seems that %%javascript cannot be used in Jupyter Lab. The mode name magic_text/x-q comes from jupyterq.
If I recall correctly, you need to install pygments-q module. I recall there was one busted release of pygments-q, so if 0.5 doesn't work for you, please install version 0.4.
When using PyQ with python in jupyter notebook, all cells use syntax highlighting of Python by default. This makes q code written in cells starting with
%%q
very confusing (suppose you use'
somewhere, and all code following it is highlighted as string in python). Hence, I wonder if someone knows some way to use q syntax highlighting in cells starting with%%q
.I find a similar question on stackoverflow. There is an answer about SQL. They say adding the following code in
~/.jupyter/custom/custom.js
to use SQL syntax highlighting in cells starting with%%sql
.Yet, I am not sure how to modify the code in the answer so it recognizes q, particularly what the
highlight_modes
should be used.The text was updated successfully, but these errors were encountered: