zls icon indicating copy to clipboard operation
zls copied to clipboard

Highlight references in formatted strings

Open arrufat opened this issue 8 months ago • 0 comments

This is what gopls does: whenever the cursor is on top of the %s, it highlights the matching argument using the same technique as LSP highlight references to the same variables.

Of course, it also works the other way around: when the cursor is on an argument, the corresponding part of the string gets highlighted:

Image

Could it be possible to add this to zls? It would come in handy when formatting strings with multiple parameters.

arrufat avatar Apr 10 '25 01:04 arrufat