lsp-mode icon indicating copy to clipboard operation
lsp-mode copied to clipboard

symbol-overlay like persistent highlights

Open mpenet opened this issue 2 years ago • 5 comments

symbol-overlay has the ability to highlight symbols at point, a bit like lsp does; lsp does it better given it knows more about the symbol. That part is covered, but symbol-overlay also adds the ability to make some highlights persistent after some keypress, with a different color per highlight (same symbols would use the same color). This is very useful for code reviews/reading. I suppose since the method for highlighting is similar between the 2 codebases (overlay-put) it would be possible to integrate this to lsp-mode as well.

Right now I rely on both modes to get what I want, I disabled idle highlights from symbol overlay in favor of lsp-symbol-highlight and use symbol overlay for the persistent feature, but that is brittle.

The 2 commands I am interested in are symbol-overlay-put (which works as toggle, so add/remove) and symbol-overlay-remove-all.

mpenet avatar Sep 16 '21 14:09 mpenet

@yyoncho do you think that would be possible to make an integration just like we did with iedit?

ericdallo avatar Sep 16 '21 14:09 ericdallo

@yyoncho do you think that would be possible to make an integration just like we did with iedit?

It seems like it will be possible with small adjustments on symbol-overlay side to allow plugging lsp-mode (cc @purcell)

yyoncho avatar Sep 16 '21 14:09 yyoncho

I've actually been working on a pluggable highlighting library recently that might fit the bill for this...

purcell avatar Sep 20 '21 10:09 purcell

Just checking-in to see if there is anything new on this.

mpenet avatar Jul 06 '22 09:07 mpenet

Yes, I worked a little more on it recently, hoping to make an initial release soon!

purcell avatar Jul 06 '22 20:07 purcell