Codemirror 6 Markers

Not directly equivalent—the idea is to keep track of the position yourself, for example somewhere in a state field, and map it to its new position on every transaction to make sure it stays in the proper place.