seunlanlege / vscode-action-buttons

VsCode extension for custom status bar buttons
90 stars 25 forks source link

Issue with documentation #15

Closed hhoweson closed 5 years ago

hhoweson commented 5 years ago

I just spent the last half hour trying to set it up and thought I would give both a suggestion for the documentation and point out an error.

In the code example it shows:

"actionButton": {
     "defaultColor": "#ff0034", // Can also use string color names.
     "commands": [
         {
             "name": "Run Cargo",
             "color": "green",
             "singleInstance": true,
             "command": "cargo run", // This is executed in the terminal.
         },
         {
             "name": "Build Cargo",
             "color": "green",
             "command": "cargo build",
         }
     ]
    }

The extension will not work unless you use "actionButtons" rather than "actionButton". Additionally it may be more useful to display it with surrounding curly brackets so that it is valid Json that the user can paste straight in as shown below.

{
    "actionButtons": {
        "defaultColor": "#ff0034", // Can also use string color names.
            "commands": [
            {
                "name": "Run Cargo",
                 "color": "green",
                 "singleInstance": true,
                 "command": "cargo run", // This is executed in the terminal.
             },
             {
                 "name": "Build Cargo",
                 "color": "green",
                 "command": "cargo build",
             }
         ]
     }
}   
seunlanlege commented 5 years ago

closed via #17