CRDTs & Positions in CodeMirror 6

Look, I spent a month and a half thinking about this, and wrote down my conclusions in that blog post. They stand.

I’m not sure how that would work. If mappings are defined in terms of document offsets (as opposed to operation IDs), how would you provide a useful mapping based on the CRDT data? Also, in which cases does this help?

In any case, the main argument against integrating a CRDT system is conceptual complexity, and ‘positions are just numbers’ is one of the main pieces of simplicity that this allowed me to preserve. I don’t expect you’ll be able to convince me otherwise.

Integrating Yjs as you did for ProseMirror, as an external component that drives the collaborative editing, should be even easier for CodeMirror (due to its much simpler data model). I think that’s the way to go. If you have specific concerns about how that’d work, let’s discuss those.