4 ms·
I added EditorConfig to a project recently, and was super disappointed with the scarcity of things I could actually configure. I thought there would be many, ma
by zck 8y ago
I added EditorConfig to a project recently, and was super disappointed with the scarcity of things I could actually configure. I thought there would be many, many config settings. But I was wrong -- there are only eight (https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties https://github.com/editorconfig/editorconfig/wiki/EditorConf...), with one of them listed as "
Supported By A Limited Number of Editors", and the editor I was using (Intellij) is listed as supporting it, but does not.
I wanted to configure a lot of things, like "braces at the end of the line, not a new line by itself", or "always use braces, even in a single-statement branch", or even "one space after 'if' before the paren".
None of these are configurable with EditorConfig. It's pretty disappointing.
- confounded 8y agoYou probably want a code-formatter (perhaps on a git hook). Trailing white space, fill-column width, and tabs vs. spaces are really all I’d expect from cross editor config.
- vmasto 8y agoIntelliJ supports editorconfig just fine. I'm not sure why you were disappointed, editorconfig does not advertise the features you mentioned. For more involved autoformatting you need some kind of tool like gofmt or Prettier for JavaScript.
- zck 8y ago> IntelliJ supports editorconfig just fine. When I set the line length config setting, and then have intellij autoformat a file, it doesn't break lines at that length. > I'm not sure why you were disappointed, editorconfig does not advertise the features you mentioned. For more involved autoformatting you need some kind of tool like gofmt or Prettier for JavaScript. The elevator pitch for EditorConfig, as taken from the first sentence of its website, is "EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs." The things I want I consider coding styles.