Hello,
in my plugin I am showing the current code coverage. I am using Gutter Icons for this. The coverage is updated whenever a test finishes, which means when a longer test suite runs, this can be kind of frequent.
I want to use the LineMarkerProvider for this, but my problem is calling the DaemonCodeAnalyzer#restart(file) whenever the coverage changes seems to be quite expensive. I can watch the CPU load go up each time especially on a bigger file. Is there another way to achieve a recalculation of the line markers? If I understand the DaemonCodeAnalyzer correctly it seems to do a lot things, like for instance syntax checking etc.
I implemented an alternative solution by using RangeHighlighters, but here the problem seems to be that they can be removed from the editor. This happens for instance when I use my plugin together with Github Copilot.
If anybody could help me out here that would be great.
Thank you.