-
Notifications
You must be signed in to change notification settings - Fork 5
variableCategories examples
zero-plusplus edited this page Dec 12, 2021
·
4 revisions
If you set recommend
for variableCategories
, the following will be set.
"variableCategories": [
{
"label": "Local",
"source": "Local",
},
{
"label": "Static",
"source": "Static",
},
{
"label": "Global",
"source": "Global",
"noduplicate": true,
"matchers": [
{
"method": "exclude",
"pattern": "^\\d+$"
}
],
},
{
"label": "Built-in Global",
"source": "Global",
"matchers": [
{
"builtin": true
},
{
"method": "exclude",
"pattern": "^\\d+$"
},
],
},
],
"variableCategories": [
"Local",
{
"label": "Global",
"source": "Global",
"noduplicate": true,
},
{
"label": "Constant",
"source": "Global",
"matchers": [
{
"pattern": "^[A-Z_]+$",
"ignorecase": false,
},
],
},
],
Built-in functions, for example, are only shown in v2. Therefore, if you debug a v1 script with the same settings, you will see unwanted categories.
To hide these unwanted categories, specify "auto"
for the hidden
attribute.
"variableCategories": [
"Local",
{
"label": "Global",
"source": "Global",
"noduplicate": true,
},
{
"label": "Built-in Func",
"source": "Global",
"hidden": "auto",
"matchers": [
{
"className": "Func",
"builtin": true,
},
],
},
],
"variableCategories": [
"Local",
{
"label": "Global",
"source": "Global",
"noduplicate": true,
},
{
"label": "Built-in Classes",
"source": "Global",
"hidden": "auto",
"matchers": [
{
"className": "Class",
"builtin": true,
},
],
},
],