This allows you to define custom actions such as run
or build
and append them to a status bar button in vscode.
You can define a custom action to build a rust project like so.
-
Search for
VsCode Action Buttons
in the extensions store. -
After installing, type
ctrl + shift + p
and open up work space settings. -
Now you can define, your action buttons. Below is a sample.
-
Now Reload.
"run": {
"defaultColor": "#ff0034", // Can also use string color names.
"commands": [
{
"name": "Run Cargo",
"color": "green",
"command": "cargo run", // This is executed in the terminal.
},
{
"name": "Build Cargo",
"color": "green",
"command": "cargo build",
}
]
}
If you open an existing project and want to set up action buttons for that workspace.
- Define the action buttons in your workspace settings.
- Then, type
ctrl + shift + p
, search forRefresh Action Buttons
and click on it. - You Should now see the action buttons on the status bar :).
Kills the running associated process and restarts it.
"run": {
"commands": [
{
"name": "Run Cargo",
"singleInstance": true,
"color": "#af565c",
"command": "cargo run",
},
]
}
Added singleInstance
option.
Added support for default Colors
Added support for reading actions from the scripts segment of package.json.
Better documentation.
Initial Release