Partial views of documents

In codemirror 5 you can use linkedDoc to link two documents together so that changes to one document are reflected in the linked document automatically. You can also provide a start and end line to linkedDoc which causes the linked document to only display the content between the provided lines.

Is there a way to achieve this behaviour in codemirror 6?
I am currently trying to extend the Split View example and starting each EditorView with a state generated with view.doc.slice(...) but I’m unsure how to modify changesets so they can be applied to the partial views. Is this the method you would recommend or are there better ways to achieve this behaviour?

I haven’t concretely tried something like that, but the idea would be to do it very differently from the CM5 approach. The split view example already points in the right direction. To provide only a subview of a document, you’d have to filter the changes so that only the parts that apply to the sub-range are applied to that view. In the process, you’d have to adjust your information about the line number where the subview starts, when the changes affect that. Actually changing the numbering of lines in a document isn’t going to be supported, but you can configure the line number gutter to show different numbers via the formatNumber option, and you could reconfigure that when the base number changes.