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

[codemirror_mode_extensions] add new nbextension #905

Merged
merged 1 commit into from
Mar 13, 2017

Conversation

jcb91
Copy link
Member

@jcb91 jcb91 commented Mar 1, 2017

This is a small nbextension adding an extension to the codemirror octave mode, because I got frustrated while using an octave kernel from metakernel. I've submitted this extension to codemirror & it's been merged, but it won't make it into notebook for a while, so I'm adding it here for now. We could also add similar extensions for other codemirror modes in future

@juhasch
Copy link
Member

juhasch commented Mar 4, 2017

👍
Commenting works for me. I can't get codefolding to work with Matlab though.

@jcb91
Copy link
Member Author

jcb91 commented Mar 4, 2017

ok, I didn't look at codefolding yet, just added what I'd found on other codemirror modes. Did you try octave as well, or just MATLAB?

For future reference, the CodeMirror PR is codemirror/codemirror5#4570

@juhasch
Copy link
Member

juhasch commented Mar 4, 2017

Actually, this is my 'fault'. In the codefolding extension, the folding options are hardcoded currently.
Let me see if this can be changed.

@juhasch
Copy link
Member

juhasch commented Mar 4, 2017

OK, I fixed the codefolding extension and removed the hardcoded folding type setting in PR #908.

However, for Matlab/Octave I don't think indent folding is correct. This is more of a convention, the language itself doesn't care about indenting.

@jcb91
Copy link
Member Author

jcb91 commented Mar 4, 2017

However, for Matlab/Octave I don't think indent folding is correct. This is more of a convention, the language itself doesn't care about indenting.

Yes, you're absolutely right, I just added it as a stop-gap, since I didn't have the time to find out how to implement more complex folding in CodeMirror. I think it requires the mode to implement it itself, but I'll have a think.

@juhasch
Copy link
Member

juhasch commented Mar 11, 2017

I think we can merge it.

@jcb91
Copy link
Member Author

jcb91 commented Mar 13, 2017

Ok, I've made a proper fold mode for octave, but haven't managed to get it to load correctly yet, so I'll merge as-is for now.

@jcb91 jcb91 merged commit 459c3bc into ipython-contrib:master Mar 13, 2017
@juhasch
Copy link
Member

juhasch commented Mar 13, 2017

Cool, I look forward to that!

@jcb91
Copy link
Member Author

jcb91 commented Mar 13, 2017

It'll be a while coming I'm afraid, as I'm away from laptop for probably the rest of this week...

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

Successfully merging this pull request may close these issues.

2 participants