pucelle / vscode-run-on-save

Run configured shell commands when a file is saved in vscode, and output configured messages on status bar.
https://marketplace.visualstudio.com/items?itemName=pucelle.run-on-save
MIT License
50 stars 11 forks source link

allow overwrite default `"runIn"` configuration #34

Closed BitFis closed 6 months ago

BitFis commented 9 months ago

Hello,

I maybe have missed this configuration, but it seems the default behavior of "runIn" is "backend". I would like to request to overwrite the default behavor via a "runOnSave.shell" global configuration, allowing the user the change between "terminal" and "backend" without the need to overwrite the projects settings.json. If there are other options to achieve this I am all ears.

Thanks

jackwhelpton commented 9 months ago

Do you have any thoughts on how this would interact with the existing "runOnSave.shell" setting, which is used when runIn="backend" to specify the path to the shell to use?

BitFis commented 9 months ago

since runIn can still be overwritten per command, I would have expected following priority. 1. overwriting all configuration with highest priority:

  1. "comman[].runIn":
  2. "runOnSave.runIn":
  3. "runOnSave.shell": set to runIn="backend"
  4. default config
pucelle commented 6 months ago

I believe this is reasonable. I add a new option runOnSave.defaultRunIn, which's default value is vscode. Will be released in coming version 1.7.1