-
Notifications
You must be signed in to change notification settings - Fork 40
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 Request] Support java.cleanup.actions #279
Comments
@asmodeus812 Sorry for late reply. I'm too busy recently :( I cannot find this commit in your fork, is the branch deleted? I've looked into your code, there seems to be 2 problems:
"java.cleanup.actions": {
"type": "array",
"markdownDescription": "The list of clean ups to be run on the current document when it's saved or when the cleanup command is issued. Clean ups can automatically fix code style or programming mistakes. Click [HERE](command:_java.learnMoreAboutCleanUps) to learn more about what each clean up does.",
"items": {
"type": "string",
"enum": [
"qualifyMembers",
"qualifyStaticMembers",
"addOverride",
"addDeprecated",
"stringConcatToTextBlock",
"invertEquals",
"addFinalModifier",
"instanceofPatternMatch",
"lambdaExpressionFromAnonymousClass",
"lambdaExpression",
"switchExpression",
"tryWithResource",
"renameFileToType"
]
},
"default": [
"renameFileToType"
],
"scope": "window",
"order": 10
}, This setting can control what actions to be executed when doCleanup command is executed. Maybe it can also be added. |
I implemented the It works nicely on my machine. Would you mind merge my commit into your branch and open a PR? |
At present, the setting
java.cleanup.actionsOnSave
is supported, which can run a set of cleanup actions on document save.The upstream now supports
java.cleanup.actions
, which is triggered manually.IMO cleanup actions is very necessary but in many cases should not be triggered on save, since some files are very low-level and should not be easily modified.
So vscode-java added a new setting that supported manually trigger cleanup acions: redhat-developer/vscode-java#3424
Is it possible to allow manually triggering in coc-java?
The text was updated successfully, but these errors were encountered: