Skip to content

Highlight references in formatted strings #2245

Open
@arrufat

Description

@arrufat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions