wolray / symbol-overlay

Highlight symbols with keymap-enabled overlays
346 stars 42 forks source link

Overlay on selection #104

Closed roife closed 12 months ago

roife commented 12 months ago

Thank you for developing this plugin. The plugin is very useful, especially the functionality of 'temp-symbol.'

However, I would like to know if it's possible to highlight only the selected area when a user chooses a certain region, for example:

image

Of course, this only affects 'temp-symbol' and doesn't impact other functionalities.

roife commented 12 months ago

Actually, I've already implemented this feature. I just wanted to know if this functionality would be accepted by upstream (for example, by setting an option to allow this behavior).

If possible, I'd be happy to submit my code.

purcell commented 12 months ago

I expect that would be out of scope for symbol-overlay, because it only ever highlights full symbols. IIRC, changes to highlight arbitrary strings have been declined in the past.

purcell commented 12 months ago

Which is to say: highlighting the region automatically would be controversial, because I imagine it immediately wouldn't work with the navigation commands, and such a thing could be trivially built if highlighting arbitrary strings were supported. Given the lack of support for merging the latter, special-case handling of the former is not likely to be merged.

roife commented 12 months ago

Thank you for the explanation, I understand now. But this feature is useful for me, if it can't be merged upstream, I might consider continuing to maintain it in my fork.