Set indentation style for composer.json
I prefer spaces over tabs ;)
To improve this over all available editors, i've created a couple of issues:
- [ ] https://github.com/pdt-eg/Core-Plugin/issues/49
- [ ] https://github.com/pulse00/Json-Eclipse-Plugin/issues/4
- [ ] https://github.com/oyse/yedit/issues/11
@gossi this will be more annoying than i thought it would be:
https://github.com/pulse00/Composer-Java-Bindings/blob/master/java-api/src/main/java/com/dubture/getcomposer/core/utils/JsonFormatter.java#L13
Making \t configurable here means a lot of work in the java-api ;)
Spaces suck! :tongue: (edit: that tongue looks really ugly!)
I thought about a formatter for the Json Editor. Where indentation character and count can be configured. May be worth it's own project an consumed by the mentioned libs/plugins. And then the Composer-Plugin can use the formatter from the Json Editor, which sounds better to me than an integration into the composer-plugin itself.
@gossi actually the embedded json editor already has options for that, see
What i meant with the EditorConfig support is that these preferences should be set automatically if an .editorconfig file is present in the project.
The thing is: We'd need to inject those preferences somehow into the above mentioned formatter.
I read about EditorConfig past my post. It's a neat idea, actually should get mainstream support from eclipse. Here is the related bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389139 So it doesn't look like that. And actually, at least indentation stuff is related to each plugin. So, which plugin is the proper target to support .editorconfig? I'd stick with the Json Eclipse Plugin, what you think?
Ref: https://groups.google.com/forum/?fromgroups=#!topic/editorconfig/0TYJ4AciIYg Two people wanted to implemented editorconfig into eclipse, not yet done.
Yeah, regarding this issue here i'd say there are 2 tasks:
- Pass down the indentation property / configuration from the Json-Eclipse-Plugin to the
JsonFormatterof the java-api. - Add support for
.editorconfigin the Json-Eclipse-Plugin
Btw: there is a global setting in the Eclipse preferences for this:

So the question is: Why do editors implement custom indentation settings in the first place and don't use the global settings?
That would make .editorconfig integration even easier.