Adding a marker to the gutter if text changes

Heya! I’ve been wondering, I wanted to add a marker to the gutter, if the line was changed, is there a plugin ready for this or is the editor capable of doing this? I’m pretty new to codemirror 6 and im really struggling understanding it’s structure and how to extend it.

I want to add a symbol or a color like in PHP Storm whenever a line is modified, and remove it once the line has been reverted to original.

Screenshot 2022-04-05 at 17.11.34

Thanks for your help in advance.

It is definitely capable of doing this, but there’s no ready-made code that implements this, so you’ll have to build it yourself. One way would be to build up a big ChangeDesc of all local changes, and use those to style a custom gutter.

I see, I’ll try, what is the ChangeDesc? Is it the object describing changes in the document?

You’re going to need the docs, which will answer questions like that.

1 Like