question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing integration of rustfmt

See original GitHub issue

To me it looks like currently there is no way to automatically or semi-automatically do source code formatting with rustfmt.

  • My preferred choice would be to run be able to configure rustfmt as a “Save action”
  • At least I would like to be able to press Ctrl+Shift+F (like for Java) and get the code formatted

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
ctroncommented, Jul 2, 2019

Ok, checking the logs shows:

[t=1562070660321] LSP4E to org.eclipse.corrosion.rls:
{"jsonrpc":"2.0","id":"11","method":"textDocument/formatting","params":{"textDocument":{"uri":"file:///home/jreimann/Development/workspace-esp32-rust/rust-esp32-hono/src/main.rs"},"options":{"tabSize":4,"insertSpaces":false}}}
[t=1562070660322] org.eclipse.corrosion.rls to LSP4E:
{"jsonrpc":"2.0","error":{"code":-32603,"message":"Reformat failed to complete successfully"},"id":"11"}

1reaction
ctroncommented, Jul 2, 2019

Still I see one enhancement/fix here. If the RLS reports and error like that, that should pop up in the Eclipse error log.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Rustfmt
Configuring Rustfmt. Rustfmt is designed to be very configurable. You can create a TOML file called rustfmt.toml or .rustfmt.toml , place it in...
Read more >
1591977 - "TypeError: run_rustfmt() missing 1 required positional ...
I wanted to see what would happen if I rust-formatted gfx/wr/webrender but got an error: mozilla mstange$ hg diff diff --git a/tools/lint/rustfmt.yml ...
Read more >
Forced rustfmt is a roadblock to contributing - Rust Internals
I have used stable rustfmt in my projects for quite a while without issue. It does not seem very hard to configure your...
Read more >
avr-device - crates.io: Rust Package Registry
avr-device is generated using atdf2svd and svd2rust . The vendor-provided atdf files can be found in vendor/ . The intermediate svd files are...
Read more >
Why are most of Rustfmt features unstable? : r/rust - Reddit
I'm not sure if you're missing the point or being disingenuous, but I'll clarify: I have never been bothered by the code style...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found