-
Notifications
You must be signed in to change notification settings - Fork 76
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
feature: Add scalafix run command and scalafix dependencies setting #1013
Conversation
package.json
Outdated
"markdownDescription": "List of Scalafix rules dependencies in case they are not available by default in Metals. For example: `com.github.liancheng::organize-imports:0.6.0`, `::` indicates Scala dependency" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at metals' PR yet so I have a few questions arisen.
they are not available by default in Metals
How one can know if rule is available by default?
For example:
com.github.liancheng::organize-imports:0.6.0
,::
indicates Scala dependency
not sure how to understand the second part with ::
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How one can know if rule is available by default?
We should probably list them somewhere 🤔
not sure how to understand the second part with ::
Maybe I tried exaplaining instead of just linking to the coursier convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Listing known rules is a good idea.
not sure how to understand the second part with ::
Maybe I tried exaplaining instead of just linking to the coursier convention.
OMG, now I realized what you meant 😂 I read Scala dependency
and then interpreted ::
a List member haha. It's probably better to provide link which explains what ::
in the context of dependencies is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified the explanation a bit. I will add the list of built in rules later on, since I haven't yet added and community ones,
For running scalafix I decided on using `ctrl+alt+shift+o` shortcut since it's one step from organize imports and should be pretty intuitive (do more than organize import so I add shift) As for the dependency settings I was thinking about using an object first, but that would require each rule to have it's dependency (but there might be multiple rules in a single dep) and it's easier to represent an Array in the settings UI.
For running scalafix I decided on using
ctrl+alt+shift+o
shortcut since it's one step from organize imports and should be pretty intuitive (do more than organize import so I add shift)As for the dependency settings I was thinking about using an object first, but that would require each rule to have it's dependency (but there might be multiple rules in a single dep) and it's easier to represent an Array in the settings UI.
Related to scalameta/metals#3996