Open
Description
Currently, when using this language server, you get warnings for global variables:
if someGlobalVariable then -- Undefined global `someGlobalVariable `. Lua Diagnostics.(undefined-global)
print("wow!")
end
The way to squelch them is to add the globals to the VSCode settings. But this is too much of a sledgehammer, as we might only want the globals to be enabled in this specific file. Thus, we should also add a feature so that end-users can specify the globals in-line:
-- We specify a list of globals at the top of the file.
-- @global someGlobalVariable
someCode()
if someGlobalVariable then -- No warning.
print("wow!")
end