Show lint gutter marker for diagnostics in replace decorations

We’d like to ensure that markers are shown in the lint gutter for diagnostics at ranges which are replaced by decorations.

It seems that the widgetMarker option for gutter might be appropriate, something like this:

Does that seem like a reasonable solution?

Did you test that and did it do what you intended? Because that is only called for block widgets, and most types of replacing decorations (such as code folding) will be inline decorations.

Yes, it works as expected for block widgets (which is the use case I’m interested in), as long as the widget has a coordsAt method so the tooltip knows where to appear.

If there’s a way to do the same thing for inline decorations, that would probably be useful in other situations. Code folding is an interesting point - it might be useful if a lint gutter marker was shown next to folded code that contains diagnostics, but I’m not sure about that.

Fair enough. I’ve merged your change in this patch.

Thanks! As far as I can tell this is working nicely, but please do feel free to make it a config option if it might not be what everyone wants.