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

Formatter adds additional lines between package and option #14

Closed
zzwx opened this issue May 13, 2021 · 9 comments
Closed

Formatter adds additional lines between package and option #14

zzwx opened this issue May 13, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@zzwx
Copy link

zzwx commented May 13, 2021

Example:

syntax = "proto3";
package test;

option go_package = "test/grpc/pb";

Hit Ctrl-Alt-L, watch 2 empty lines added above option.

@zzwx
Copy link
Author

zzwx commented May 13, 2021

Additional info. That doesn't happen if an import statement is between package and option.

@zzwx
Copy link
Author

zzwx commented May 13, 2021

A guess: an artifact from auto-removal portion of unused imports.

@devkanro
Copy link
Owner

bug

I can't reproduce it. can you provide your proto before formatted?

@devkanro
Copy link
Owner

Reproduce it after check import optimizer option in formatter.

@devkanro devkanro added the bug Something isn't working label May 13, 2021
@devkanro
Copy link
Owner

Fixed in cf35cf2

Additionally, I add line break settings in code style setting page, just change it if you have your own style.
Snipaste_2021-05-14_02-33-36

@zzwx
Copy link
Author

zzwx commented May 13, 2021

Amazing, you are so fast!

@devkanro
Copy link
Owner

I planned to release it with symbol resolver in quick document, it dependent on commonmark/commonmark-java#205 merged

@devkanro
Copy link
Owner

devkanro commented May 14, 2021

Before released you can test it with 1.3.0-SNAPSHOT
IntelliJ.Protobuf.Language.Plugin-1.3.0.zip

@zzwx
Copy link
Author

zzwx commented May 14, 2021

Well done! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants