How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows WSL
What is the issue affecting?
Type Checking, Diagnostics/Syntax Checking, Libraries
Expected Behaviour
First type should be a number, second - a string, third - a boolean
Actual Behaviour

Reproduction steps
main.lua
local number, string, boolean = require "required"
required.lua
return 1337, "string", true
Additional Notes
No response
Log File
No response
Activity
special treate for return values of require
sumneko commentedon Feb 2, 2023
File can only return one value, I will add a diagnostic about it.
artemking4 commentedon Feb 2, 2023
ehh, well, in some environments it can return more than one, can we have a switch or something for that?
sumneko commentedon Feb 2, 2023
This is a non-standard behavior.
There are countless non-standard behaviors in the world, and I don't want to add switches to them one by one.
artemking4 commentedon Feb 2, 2023
well, this library already supports non-standard environments, like love2d and special operators like /*, //, && and ||, so why not add this? Personally, i would expect this to be a feature even in the vanilla lua, not sure if it actually supports that though.
Is it something that is hard to implement maybe?
sumneko commentedon Feb 2, 2023
This is why I added https://github.com/sumneko/lua-language-server/wiki/Plugins .
Besides,
/*,//are famous non-standard symbols, like I built in some famous environment definition files such aslove2d,skynet.