Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala syntax highlights in the ipython 3.1.0-cbccb68 #16

Open
rzykov opened this issue Apr 29, 2015 · 6 comments
Open

Scala syntax highlights in the ipython 3.1.0-cbccb68 #16

rzykov opened this issue Apr 29, 2015 · 6 comments

Comments

@rzykov
Copy link

rzykov commented Apr 29, 2015

We found that scala syntax highlight works in ipython 3.0.0, but doesn't work in ipython 3.1.0-cbccb68
I think it caused by this commit in ipython ipython/ipython#6793

@tribbloid
Copy link
Owner

Thanks a lot. This proves my speculation, a patch is already on the way. It's interesting to see that ipython#6793 is also half done: when you first switch the kernel it uses kernelspec, if you open the notebook again it uses kernel_info
May I ask an off-topic question? The comment shortcut "ctrl-/" seems to use python's "#" instead of codemirror's "//" on scala kernel, does #6793 also fix the comment shortcut problem?

@rzykov
Copy link
Author

rzykov commented Apr 30, 2015

I have a Mac, CMD-/ comments line correctly with "//" under ipython 3.0.0

@tribbloid
Copy link
Owner

Good! so theoretically I can fix both, give me a few days :) Thanks a
lot buddy

On 04/30/2015 05:13 AM, rzykov wrote:

I have a Mac, CMD-/ comments line correctly with "//" under ipython 3.0.0


Reply to this email directly or view it on GitHub
#16 (comment).

@tribbloid
Copy link
Owner

OK, it looks like the workload is more than I expected: The IPython server has an built-in adapter to convert messaging protocol v4 to v5. But its not very well rounded (some conversions are incomplete, like autocompletion and kernel_info_reply), so I either upgrade the entire protocol to v5, or tolerate the incomplete adapter. I'll gradually implement the new protocol and try to reach the author of IScala, see if I can backport the new protocol.

Thanks a lot

@tribbloid
Copy link
Owner

I've updated the messaging protocol to the latest version but seems like it doesn't help anything. Here is my post for the problem:

http://python.6.x6.nabble.com/kernel-info-reply-is-ineffective-on-code-highlighting-td5095065.html

Any help is appreciated. Also, the latest messaging protocol has been committed to IPython-3.x branch, so please be sure that you've checkout that branch before testing.

@tribbloid
Copy link
Owner

OK, now I can confirm that the kernel/messaging is working properly.
The problem is caused by notebook codemirror javascript which always returns /codemirror/mode/clike/clike.js
The problem has been reported in IBM spark-kernel before: https://github.com/ibm-et/spark-kernel/issues/109
Now I just need to find the frontend solution.
@rzykov: since you have observed syntax highlighting on IPython 3.0 I think your codemirror javascripts are already fixed. Could you help me test the latest build again or tell me how to override clike.js being used for Scala?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants