Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set indentation style for composer.json #56

Open
hason opened this issue Apr 17, 2013 · 6 comments
Open

Set indentation style for composer.json #56

hason opened this issue Apr 17, 2013 · 6 comments

Comments

@hason
Copy link

hason commented Apr 17, 2013

I prefer spaces over tabs ;)

@pulse00
Copy link
Owner

pulse00 commented Apr 17, 2013

@pulse00
Copy link
Owner

pulse00 commented Apr 17, 2013

@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 ;)

@gossi
Copy link
Collaborator

gossi commented Apr 17, 2013

Spaces suck! 👅 (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.

@pulse00
Copy link
Owner

pulse00 commented Apr 18, 2013

@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.

@gossi
Copy link
Collaborator

gossi commented Apr 18, 2013

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.

@pulse00
Copy link
Owner

pulse00 commented Apr 18, 2013

Yeah, regarding this issue here i'd say there are 2 tasks:

  1. Pass down the indentation property / configuration from the Json-Eclipse-Plugin to the JsonFormatter of the java-api.
  2. Add support for .editorconfig in the Json-Eclipse-Plugin

Btw: there is a global setting in the Eclipse preferences for this:

Screen Shot 2013-04-18 at 4 22 33 PM

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants