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

Control which line ScalaDoc text starts on #2215

Closed
Dpetters opened this issue Oct 4, 2020 · 3 comments · Fixed by #2217
Closed

Control which line ScalaDoc text starts on #2215

Dpetters opened this issue Oct 4, 2020 · 3 comments · Fixed by #2217

Comments

@Dpetters
Copy link

Dpetters commented Oct 4, 2020

  • Version: 2.7.2
  • Integration: IntelliJ
  • Configuration:
    docstrings.style = SpaceAsterisk
version = 2.7.3
maxColumn = 120
docstrings.style = SpaceAsterisk

Steps

Given code like this:

/** 
  *
  * Bar
  * Baz
  */
object Foo { }

Problem

Scalafmt formats code like this:

/**
  * Bar
  * Baz
  */
object Foo { }

Expectation

I would like the formatted output to look like this:

/** Bar
  * Baz
  */
object Foo { }

Notes

Per the ScalaDoc style: "the text in the Scaladoc styles begins on the first line of the comment. This format saves vertical space in the source file."

Is there a way I can acheive this without setting docstrings.wrap to yes?

@poslegm
Copy link
Collaborator

poslegm commented Oct 5, 2020

Is there a way I can acheive this without setting docstrings.wrap to yes?

AFAIK no

cc @kitbellew

@kitbellew
Copy link
Collaborator

looks like possibly inconsistent. let me look.

@Dpetters
Copy link
Author

Dpetters commented Oct 5, 2020

Thank you both very much!

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 a pull request may close this issue.

3 participants