Skip to content

Add .editorconfig #295

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

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Conversation

adaliea
Copy link

@adaliea adaliea commented Jun 17, 2023

The settings are from:
https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
(Google Java Style)

With the following exceptions:

  • Star imports allowed
  • Hard wrap increased to 120 characters
  • No blank lines after class declaration are required
  • Tab size & indent increased to 4 characters
  • Continuation Indent increased to 8 characters

(These changes help the auto formatter more closely align with the code already written)

Note: I haven't reformatted any of the already existing code. I can run it if you'd like (as quite a bit of it doesn't follow the guidelines)

The settings are from:
https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml

With the following exceptions:
- Star imports allowed
- Hard wrap increased to 120 characters
- No blank lines after class declaration required
- Tab size & indent increased to 4 characters
- Continuation Indent increased to 8 characters

(These changes help the auto formatter more closely align with the code already written)
@RUGMJ
Copy link
Member

RUGMJ commented Jun 17, 2023

Is there a more general format for multi editor? Eclipse and vscode are both used by other contributors. Vscode supports eclipses format, does intellij support it?

@adaliea
Copy link
Author

adaliea commented Jun 25, 2023

Hi, Sorry for the late reply (I was on vacation).

IntelliJ has a way to export the IntelliJ formatter settings I created into an Eclipse XML, so I think we should be fine if we just have the IntelliJ & Eclipse settings together.

I don't use Eclipse so I don't know where it creates the files when configuring the autoformatter settings. (If you do, could you enable the autoformatter/change a few settings and take a screenshot of what the file structure it creates looks like so I could put the files in the correct location?)

@RUGMJ
Copy link
Member

RUGMJ commented Jun 25, 2023

I just checked, eclipse, vscode, intelliJ and neovim all support EditorConfig this would probably be the better choice as its not editor dependent

@RUGMJ
Copy link
Member

RUGMJ commented Jun 25, 2023

You can also export intellij's format to editor config

@adaliea
Copy link
Author

adaliea commented Jun 28, 2023

I just checked, eclipse, vscode, intelliJ and neovim all support EditorConfig this would probably be the better choice as its not editor dependent

Ok changed I just changed it to use .editorconfig

@adaliea adaliea changed the title Add formatter settings for IntelliJ's Auto formatter Add .editorconfig Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants