Open japhib opened 2 years ago
Maybe also a magic comment to disable "unknown global" for a specific variable -- although, maybe a better answer is just setting something like my_var = nil
at the top of the file. (that does take tokens, though, and a magic comment would not.)
Something like that would be nice. I use pico-build and split the code over multiple files. So I get "undefined variable" everywhere xD
Something like that would be nice. I use pico-build and split the code over multiple files. So I get "undefined variable" everywhere xD
A quick workaround (though not ideal) is to add
"Lua.diagnostics.disable": ["undefined-global", "lowercase-global"]
to you workspace settings.lua or globally if you don't want to worry about it for every project (but then you loose those errors on normal lua files)
Something like:
Since we don't have any auto corrections for warnings/errors, it'd be nice if adding these showed up as a code correction for warnings/errors. (like they do for eslint)