How to configure rustfmt #6595
-
Hi, I am trying out Zed and was wondering if I could configure rustfmt when using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
I don't think we currently have a way to associate commands with a given key binding, but I've heard others mentiong wanting this, so we might want to convert this into a feature request. |
Beta Was this translation helpful? Give feedback.
-
my solution was to follow the rustfmt repo instruction. you may get error: toolchain 'nightly-...' is not installed in which case, run then you can add the "lsp": {
"rust-analyzer": {
"initialization_options": {
"rustfmt": {
"extraArgs": ["+nightly"]
}
}
}
} settings to Zed. |
Beta Was this translation helpful? Give feedback.
For me, the problem was that
zed
wasn't runningrustfmt
innightly
.I solved it with the suggestion at #4491 (comment):
I thought I had to configure in
Zed
, but it's reading fine fromrustfmt.toml
.So, I guess the answer is: just edit the
rustfmt.toml
like usual.