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

Formatting support #1176

Open
CsCherrYY opened this issue Mar 20, 2023 · 5 comments
Open

Formatting support #1176

CsCherrYY opened this issue Mar 20, 2023 · 5 comments
Assignees

Comments

@CsCherrYY
Copy link
Contributor

CsCherrYY commented Mar 20, 2023

Typical Problems

  • Not easy to use or set up/Don't know how to configure or customize formatting option
  • The formatter settings don't take any effect/The formatter result is not as expected
  • Indentation problems: indentation should be overridden with formatter profile
  • Feature requests: support IntelliJ scheme, support google-java-format, support integrating checkstyle etc.

Work Items

P1

  • Introduce VS Code style formatter scheme
    • Introduce new VS Code configuration: java.format.settings
      • Deprecate existing java.format.settings.url and java.format.settings.profile
      • Accepts different formatter schemes (engines)
      • Keep compatibility with current custom profile path
      • Can configure some popular formatter rules
        • A subset of eclipse formatter settings, consist of The settings mentioned in existing Github issues
      • Relationship with VS Code indentation settings: Override?
    • Migrate "VS Code formatter settings preview" to vscode-java
      • The description of the configuration java.format.settings should contain a markdown command to the preview UI
  • Other features should respect correct formatter options (especially indentation & tab/space)
    • Code Action/refactoring/quickfix
    • Paste handler

P2

P3

  • New capabilities
    • Checkstyle support
    • Google-java-format support
  • Persistence: export VS Code formatter settings into other IDE’s scheme
@CsCherrYY CsCherrYY self-assigned this Mar 20, 2023
@nickzhums
Copy link
Member

Thanks for opening this, very comprehensive summary :)

@wufeiwua
Copy link

wufeiwua commented Sep 5, 2023

Any news on this? I'm so expecting the feature.

@nickzhums
Copy link
Member

@wufeiwua which one are you referring to?

@wufeiwua
Copy link

wufeiwua commented Sep 5, 2023

@wufeiwua which one are you referring to?

Formatter for IntelliJ default style. I tried exporting the configuration file for IDEA, and it was configured in vscode (https://code.visualstudio.com/docs/java/java-linting). But there are still a lot of differences between them.

@nickzhums
Copy link
Member

Thanks, let us discuss this

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