Hi ! Happy new year to all.
I've had a look at how to build a minimap integration for this package, as @t9md noted elsewhere he is not a user of minimap himself.
I have something basic working, but I've had to make some modifications to quick-highlight as one of the current optimizations (highlighting only what's visible) means we would also show, in the minimap, those highlights only. In the context of minimap it kind of defeats its purpose, in my opinion.
So, I'm now creating all highlights (even invisible ones), which could affect performance negatively, especially for large files.
On the other side, there's currently two subscriptions to the editor scroll events that I can remove, so this will give a smoother experience during scroll, especially on large files.
What do you think @t9md ? Should such changes live in a fork, or could they be merged here ? I know some people do not use minimap, so if the change mentioned above sounds bad to you, I understand you'll be cautious about it.
Thanks, I think it's mergable.
But if performance impact is big, I want make all-highlight-optional(auto detect minimap-quick-highlight and passing option to rendering method of quickhl?).
If you have working minimap package repo, I can update my quick-hl by myself.
Here's the early working repo, not published on apm yet:
And here are the changes I did on a local version of quick-highlight:
I believe any perf impact would be visible only on large files. Maybe the size of the file would be a good trigger to decide whether to rerender on scroll or to render everything once.
Thank, will check tomorrow.
@t9md just updated, it's pretty cool now - it works for manual toggles too, and with the proper colors.
@gouegd Checked, cool!
I'm working on branch provide-service-for-minimap. for PR #13.
Pls check comment in #13 for the required code change of your minimap-quick-highlight.
@t9md ok, I just pushed this small change.
Time to sleep here, I'll check back tomorrow 👍
Done in #17