Closed smac89 closed 8 months ago
shfmt
has not been activated in your config therefore nothing happens: no errors, no console output.
Using your modified config with"disable": false,
option:
// Do NOT edit anything in the left-hand pane.
// Pick up items you need, just make sure to maintain the structure.
{
"debug": true,
"open_console_on_failure": true,
"show_statusbar": true,
"formatters": {
"shellcheck": {
"disable": true,
},
"shfmtmin": {
"disable": true,
},
"shfmt": {
"disable": false,
"syntaxes": ["bash"],
"executable_path": "/Users/admin/go/bin/shfmt",
//"config_path": {
// "default": "${packages}/User/formatter.assets/config/shfmt_rc.json"
//},
"args": ["-i", 2],
"format_on_save": true,
"format_on_paste": false
}
}
}
▋[Formatter](MainThread:formatter_shfmt.py#L52): [DEBUG] Current arguments: ['/Users/admin/go/bin/shfmt', '-i', '2', '-']
▋[Formatter](MainThread:main.py#L415): [DEBUG] Formatting successful. 🎉😃🍰
Ok that's a bit confusing. I thought "disable": false
was already the default. Since it was listed as part of the default settings for the plugin. If all plugins are disabled by default, maybe the default settings should say that ("disable": true
or better "enable": false
)
@smac89 I have released 1.1.5 some days ago, with this release all plugins are disabled by default ("disable": true). I will add some notes to the readme and the settings file, which have been removed sometimes ago.
I added the following file:
I have the following configuration for the formatter:
When I save the file, nothing happens: no errors, no console output.
Whereas if I run
shfmt -i 2 /tmp/foo.sh
, the output is: