-
Notifications
You must be signed in to change notification settings - Fork 9
Import Settings
The global setting imports
can define one or more paths of external files, which are merged with the data of the settings.json
file in the .vscode
sub folder.
{
"ego.power-tools": {
"imports": [
"relative/to/settings/file.json",
"/full/path/to/settings.json"
]
}
}
Imported setting files must have the same structure as the settings.json
.
Relative paths will be mapped to the .vscode
sub folder of the workspace or the .vscode-powertools
sub folder inside the current user's home directory.
If a file cannot be found, the entry is ignored and NO error is thrown.
Many settings support an importValues
property, which, when defined, imports values to their properties from external values.
The following example, will import the buttonText
and buttonTooltip
values to the text
and tooltip
properties of the declared button.
{
"ego.power-tools": {
"buttons": [
{
"importValues": {
"text": "buttonText",
"tooltip": "buttonTooltip"
},
"action": {
"type": "script",
"script": "my_button.js"
}
}
],
"values": {
"buttonText": "My button",
"buttonTooltip": {
"type": "code",
"code": " 'This is a tooltip' + ' for the button, generated by code' "
}
}
}
}
licensed under GDFL 1.3 - © Next.e.GO Mobile SE