Skip to content

Plugin Configuration

tobspr edited this page Nov 12, 2015 · 14 revisions

Writing plugin configurations

Each plugin has to have its own configuration file, named config.yaml. In that configuration file, information about the plugin and settings are contained.

Each configuration file needs to contain at least these fields:

name: PluginName
author: your_name <[email protected]>
version: 1.0
description: This plugin adds support for some Feature.
settings:
    -- see below

The above fields should be self-explanatory. The settings field has to be always present, even if the plugin has no settings.

Settings

settings should be a yaml-dictionary where the key denotes the identifier of the setting, and the contents specify the contents of the setting. For example:

settings:
    my_setting:
        -- setting options, see below
    other_setting:
        -- setting options, see below

To query settings, see the [Plugin API](Plugin API).


Each setting consists of atleast a type, default, label and description. There are 4 different setting types: int, float, enum and bool where you can choose from. Each settings type adds a few additional options which can be specified. Below you can find a list of examples for those types:

Int-Settings

    some_int_setting:
        type: int
        range: [0, 10]
        default: 5
        label: Some integer setting
        description: Description of the setting.

Float-Settings

    some_float_setting:
        type: float
        range: [-5.3, 2.9]
        default: 2.5
        label: Some float setting
        description: Description of the setting.

Boolean-Settings

    some_bool:
        type: bool
        default: false
        label: Some boolean setting
        description: Description of the setting.

Enum-Settings

    some_enum:
        type: enum
        values: [value1, value2, value3]
        default: value2
        label: Some enum setting
        description: Description of the setting.