GoLand 2022.2.4
Build #GO-222.4345.24, built on October 11, 2022
Runtime version: 17.0.4.1+7-b469.62 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Operating system:
Linux 5.4.0-128-generic
Current Desktop: XFCE
Problem description
I write a lot of both go and rust.
I'm trying to reduce context-switch friction.
Is there a simple way for the rust plugin to convert v := into let v =?
Maybe a live template? postfix templates don't seem to work for since there is no dot/period
Steps to reproduce
open a rust file
make a function
in the function try to declare a variable (incorrectly) using go syntax (v :=)
wish that the awesome rust plugin would auto convert to let v =
Hmm, I'd suggest to do it using RsElementBaseIntentionAction, like AddElseIntention. See these blog posts (1, 2) (thank to @Kobzol!).
But since v := can't be parsed as a valid Rust syntax, I wouldn't expect it to be very easy 😅
Environment
IntelliJ Rust plugin version:
Rust toolchain version:
IDE name and version:
Operating system:
Problem description
I write a lot of both go and rust. I'm trying to reduce context-switch friction. Is there a simple way for the rust plugin to convert
v :=
intolet v =
?Maybe a live template? postfix templates don't seem to work for since there is no dot/period
Steps to reproduce
v :=
)let v =