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

Line formatting config? #37

Open
Macintosh-Fan opened this issue Jan 30, 2025 · 1 comment
Open

Line formatting config? #37

Macintosh-Fan opened this issue Jan 30, 2025 · 1 comment
Labels
question Further information is requested

Comments

@Macintosh-Fan
Copy link

How can I configure so that I don't get formatting like this for Java?
Image

I don't like the blank line it adds here:
Image

@valentinegb valentinegb added the question Further information is requested label Jan 31, 2025
@valentinegb
Copy link
Collaborator

valentinegb commented Jan 31, 2025

By default, Zed will use the Java Prettier extension. I'm not sure if there are Prettier configuration options to stop these behaviors, but you can add this line to your Zed settings to let JDTLS, the language server, handle formatting instead, which I don't think exhibits the same behaviors:

"languages": { "Java": { "formatter": "language_server" } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants