-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Annotations, Libraries
Expected Behaviour
local utf8 = require("utf8")
gives UTF-8 function definitions regardless of Lua version.
Actual Behaviour
local utf8 = require("utf8")
only gives UTF-8 function definitions if Lua runtime version is 5.3 or later.
Reproduction steps
Reproducible with one line of code.
local utf8 = require("utf8")
On Lua runtime < 5.3, utf8
is unknown.
Additional Notes
Some Lua < 5.3 environments (e.g. love) provides Lua 5.3 utf8
module but this must be loaded separately using require
.
It's reasonable to have utf8
in global namespace when user runtime is set to Lua 5.3 or later, but don't put the utf8
module in Lua 5.3 check, a.k.a. allow it to be loaded manually using require
on earlier Lua version.
Log File
N/A, easily reproducible.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working