-
Notifications
You must be signed in to change notification settings - Fork 2.7k
unset
all defaults in .editorconfig for *.rs
#9387
Conversation
Opts to use `rustfmt.toml` behavior for rust files by ignoring in .editorconfig https://editorconfig.org/#supported-properties [Node.js canonical usage example](https://github.com/nodejs/node/pull/28440/files)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me, however, we might want to keep it as is until all the files are formatted and this is enforced by CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any reason why we need to do this. Rustfmt formats anyway and having a good default from the beginning is good.
I only worry about conflicts: not sure all IDE decide that rustfmt overrides editorconfig, and if not, then this leaves code unformatted. Thus implying that you must you rustfmt instead of assuming they have the same or non-conflicting behavior with editorconfig. I figure it's fine with or without, this just makes the behavior more clear IMHO. |
The one is an editor config and the other one a formatting tool. How should the former ever overwrite the later? |
From my experience, "format on save" will pick up on both of these in VSCode, I have not tested the behavior yet. I can if desired and report results. |
Yeah please test it. However there are also people who don't use vscode ;) |
Embarrassingly, this seems to be a no-op , as the behavior AFAICT is the same, including active moving to a new line based on the max line length set in .editorconfig with this Using "format on save" with the
|
Opts to use
rustfmt.toml
behavior for rust files by ignoring in .editorconfig based on #8982https://editorconfig.org/#supported-properties
Node.js canonical usage example