Hi!
We have a document that contains inline suggested-deletions. Something like “foo̶b̶a̶r̶baz”. In our editor we hide the deleted range completely, so it just looks like “foobaz”. This avoids awkward position mapping for all edits where you’d otherwise have to map changes late in the document past all previous “deleted” ranges.
Hiding the ranges via decorations generally works well, but one of the things that fall over is syntax highlighting as that works on the underlying text rather than the visible text. Here’s an example that hides some ranges via atomic decorations: Try CodeMirror . Here for is incorrectly highlighted due to the underlying text being foignoredr.
Is there a way to affect how the text is passed to the Lezer system, or would it be better keeping the ranges external, and do the position mapping manually as required?
All the best, Mathias