You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mark corresponding variable in String.formatted(..) if cursor is on %s (and vice versa) #4350
If you have big Strings, e.g. block Strings, with some %s (or other) placeholders for variables that are then inserted with an .formatted(...) invocation, it is sometimes really hard to see
where the placeholder occurs in the String, or
which variable name the placeholder refers to.
For 1. a solution would be to mark the corresponding placeholder inside the String if the cursor is on a variable inside .formatted(...)
For 2. one solution would be to highlight the according variable inside the .formatted(..) invocation. An alternative would be a popup with the variable name.
Activity
fbricon commentedon Feb 26, 2026
How about providing inlay hints instead? that would cover both cases IMHO:
would render as :
No need to hover, you know exactly which placeholder matches to what
fbricon commentedon Feb 26, 2026
like that :-)
reuschling commentedon Feb 27, 2026
This is fantastic, even better as highlighting corresponding things. Thank you very much!