1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-- if not set, the folder name will be used
name = 'Example'
-- list of matched words
words = {'thisIsAnExampleWord%.ifItExistsInFile%.thenTryLoadThisLibrary'}
-- list or matched file names. `.lua`, `.dll` and `.so` only
files = {'thisIsAnExampleFile%.ifItExistsInWorkSpace%.thenTryLoadThisLibrary%.lua'}
-- lsit of settings to be changed
configs = {
{
key = 'Lua.runtime.version',
action = 'set',
value = 'LuaJIT',
},
{
key = 'Lua.diagnostics.globals',
action = 'add',
value = 'global1',
},
{
key = 'Lua.runtime.special',
action = 'prop',
prop = 'include',
value = 'require',
},
{
key = 'Lua.runtime.builtin',
action = 'prop',
prop = 'io',
value = 'disable',
},
}
for _, name in ipairs {'global2', 'global3', 'global4'} do
configs[#configs+1] = {
key = 'Lua.diagnostics.globals',
action = 'add',
value = name,
}
end
|