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
Is your feature request related to a problem? Please describe.
My colleague Clement Pit Claudel had an interesting suggestion. It's often helpful to know whether a function argument is by-name or by-value. Can we have a way to highlight by-name arguments?
Describe the solution you'd like
He suggested to insert a grey arrow in front of a call-by-name argument.
I.e. if
f(x: =>Int)
then f(1 + 2) would be highlighted as
f(=>1+2)
Describe alternatives you've considered
Since by-name arguments often span multiple lines, a leading => is probably better than traditional syntax highlighting/
Additional context
No response
Search terms
by-name argument, syntax highlighting
The text was updated successfully, but these errors were encountered:
Thanks for reporting! That should be be easy to do now since we use the compiler directly for showing synthetics etc.
@jkciesluk was looking into it, might be interesting to add it after finishing the work with inlay hints, which will replace the current custom protocol.
The biggest issue will be figuring out a way to convey to users all the possible options for decorations and what they will cause.
Is your feature request related to a problem? Please describe.
My colleague Clement Pit Claudel had an interesting suggestion. It's often helpful to know whether a function argument is by-name or by-value. Can we have a way to highlight by-name arguments?
Describe the solution you'd like
He suggested to insert a grey arrow in front of a call-by-name argument.
I.e. if
then
f(1 + 2)
would be highlighted asDescribe alternatives you've considered
Since by-name arguments often span multiple lines, a leading
=>
is probably better than traditional syntax highlighting/Additional context
No response
Search terms
by-name argument, syntax highlighting
The text was updated successfully, but these errors were encountered: