sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

switch to CodeMirror version 6? #5401

Open williamstein opened 3 years ago

williamstein commented 3 years ago

CodeMirror version 6 may finally be sufficiently stable to consider switching to. Doing so in CoCalc will be a huge amount of work since the API has changed. It might be very worth it. This issue is about switching.

Here is the corresponding JupyterLab issue: https://github.com/jupyterlab/jupyterlab/issues/10370

williamstein commented 3 years ago

There is recent active work on vim mode support here: https://github.com/codemirror/codemirror.next/issues/79

If we were to switch, I could see me helping finish that project...

williamstein commented 3 years ago

There is very significant momentum behind codemirror 6 for jupyterlab, so that's a good sign.

williamstein commented 2 years ago

Here's the CodeMirror 6 PR: https://github.com/jupyterlab/jupyterlab/pull/11638

My current thinking is definitely that I'm not at all sure that we will ever switch to CodeMirror 6. I'm just not confident yet. It's probably not harder to switch to Monaco, and that has interesting advantages regarding LSP support...

jasongrout commented 2 years ago

Just consolidating info for future reference:

Author here: We might release our LSP implementation for CodeMirror some time this year. The LSP integration for Monaco is lackluster, it works, but isn't great. We thought LSP would work perfectly on Monaco only to find out that the Monaco APIs are very different from LSP APIs or even VSCode APIs. The 3rd party package out there is good, but you need a bunch of monkey-patching to make it work in an "IDE" environment.

and on accessibility:

CodeMirror 6 appears to be more accessible. However it still only shows one line at a time. So that's still worse than Monaco. Monaco can show one or two hundred lines at a time. So with CodeMirror 6 I still would have to read text line by line without any way to skip a function for example, which is unnecesarily tedious.

williamstein commented 2 years ago

A Jupyter dev made a video about migrating to CM 6: https://www.youtube.com/watch?v=Jtl7mLP1LKU

williamstein commented 1 year ago

Very interesting status here: https://github.com/jupyterlab/jupyterlab/issues/12812

williamstein commented 1 year ago

Replit wrote ports of emacs/vim/vscode for CM6! replit extensions (vim, emacs, vscode)

williamstein commented 8 months ago

We should also continue to consider https://www.npmjs.com/package/monaco-editor for various reasons. I've been putting off upgrading from Codemirror 5, because of the Monaco versus CM6 "debate", and we could evaluate this again soon...