starlight icon indicating copy to clipboard operation
starlight copied to clipboard

Allow user to customise available global variables

Open paulcuth opened this issue 9 years ago • 1 comments

Add an array to the configuration object called libs. If present, parse the values in order and add/remove global vars according to the following rules:

value action
* Add all global methods and namespaces
.propName Add the propName global method only
libName Add the libName namespace and all its properties
libName.propName Add the propName property of libName only
-libName Remove libName namespace and therefore all its properties
-libName.propName Remove propName property of libName only

Examples:

[ '*', '-window' ] All libs except window.

['.setmetatable', 'table'] setmetatable() and all of the table lib only.

['string', '-string.reverse'] Only the string lib without string.reverse().

paulcuth avatar Mar 29 '16 20:03 paulcuth

Please add a thumbsup reaction if you'd like to see this feature, this'll help me to prioritise.

paulcuth avatar Jul 11 '17 19:07 paulcuth