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

feature: add doNotDisturb mode #42

Closed Tristano8 closed 3 months ago

Tristano8 commented 4 months ago

This is to prevent the Output window from being focused on every runOnSave command that throws a non-zero exit code (such as when there's a formatting error in a file). There are other tools that may catch this and it's convenient to keep the Terminal window focused at all times (i believe this was the original intention of "backend" mode)

Tested by creating the following command in an Extension Development Environment with the following settings.json:

{
  "runOnSave.commands": [
    {
        "globMatch": "**/*.js",
        "command": "exit 2",
        "runIn": "backend",
        "doNotDisturb": true
    }
  ]
}
pucelle commented 3 months ago

Published v1.9.0, include this merge, thanks.