Configuration¶
The plugin's options are read from its entry in opencode.json(c).
| Option | Type | Default | Description |
|---|---|---|---|
access | all | ask-changes | read-only | "all" | How much the plugin's methods may do. |
allowUntestedHost | boolean | false | Start outside the tested OpenCode range. |
theme | string | "light" | The theme every chart uses when a call names none. |
locale | string | "en-US" | The locale numbers and dates are formatted in. |
outDir | string | "outputs/charts" | The workspace folder files are written under. |
themes | object | {} | Named themes from configuration, each a theme object with extends, colours and fonts. |
Examples¶
A light default theme and a workspace folder:
{
"plugins": [
["github:we-the-rebel-alliance/charts-plugin#v0.0.3", { "theme": "light", "outDir": "charts" }]
]
}
Ask before any chart is written, and never write a saved theme:
{
"plugins": [
["github:we-the-rebel-alliance/charts-plugin#v0.0.3", { "access": "ask-changes" }]
]
}
A named theme from configuration, used with theme: "acme":
{
"plugins": [
[
"github:we-the-rebel-alliance/charts-plugin#v0.0.3",
{ "themes": { "acme": { "extends": "light", "colors": { "highlight": "#0b5fff" } } } }
]
]
}
theme and locale are the defaults every call may override. outDir must stay inside the workspace; a path outside it is refused. A themes entry is the same theme object a call may pass inline or theme_save may write.