wolray / symbol-overlay

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

Activating overlays in a transient manner #109

Open vemv opened 7 months ago

vemv commented 7 months ago

Hi!

Great package, thanks for the work.

I wonder if there's a pre-made recipe for displaying the overlay in a transient manner?

e.g.:

This works similarly to the "highlight local vars" feature in misc IDEs (IIRC).

This might be hackable with the current API but of course, if someone has sweated the details before, so much the better.

Thanks - V

hmelman commented 5 months ago

See Issue #59

vemv commented 5 months ago

Hi @hmelman , thanks for chiming in! Interesting.

However I meant 'transient' as in temporary, not as in the Transient package. Which is nice as well - good snippet!

hmelman commented 5 months ago

However I meant 'transient' as in temporary, not as in the Transient package.

Ah, I read fast and misunderstood.

Since symbol-overlay-put toggles the highlighting, I find it easy to turn off. There is symbol-overlay-mode which auto highlights the symbol under point which you may find useful.