vscode-gradle-language
vscode-gradle-language copied to clipboard
Add document formatter for build.gradle
It would be great if we could auto-format the build.gradle file.
When executing formatDocument
on the build.gradle
file, an alert pops up indicating:
There is no document formatter for 'gradle'-files installed.
Keyboard mapping:
{
"key": "shift+alt+f",
"command": "editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
}
This issue is even worse because when we click on Install formatter..., it searches for category:formatters gradle
, and naco-siren.gradle-language
is the only result.
Don't categorize your extension as a formatter if it's not a formatter!
You can have a look at Vs Code Groovy Lint , it also formats .gradle files :)
You can have a look at Vs Code Groovy Lint , it also formats .gradle files :)
groovy lint can format build.gradle,but you have to change the language mode to groovy.
You can have a look at Vs Code Groovy Lint , it also formats .gradle files :)
groovy lint can format build.gradle,but you have to change the language mode to groovy.
Maybe i can find a way to auto-detect it as gradle file ^^
Gradle extension could also implement it by calling npm-groovy-lint under the hood (there is a --format option, and it can be used as a module)