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

Auto format package declaration when splitting namespace or joining multiple consecutive statements #272

Open
Swoorup opened this issue Apr 28, 2022 · 1 comment

Comments

@Swoorup
Copy link

Swoorup commented Apr 28, 2022

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

When using IDE such as VSCode, I'd like metals to auto format package statement when either splitting or joining. For example:

Splitting

package org.mygreat.[Press Enter]library

or

package org.mygreat[Press Enter].library

Metals will then auto format to the following:

package org.mygreat
package library

Joining

package org.mygreat [Ctrl-J or Join Line action]
package library

Metals will then auto format to the following:

package org.mygreat.library

Describe alternatives you've considered

N/A

Additional contex

IntelliJ Scala plugin currently provides both of these features

Search terms

package, import

@tgodzik
Copy link
Contributor

tgodzik commented Apr 28, 2022

Thanks for reporting! This looks like a cadidate for onTypeFormatting, should be simple enough to handle.

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

No branches or pull requests

2 participants