Mark variable as local without defining it as local #3219
Replies: 1 comment 6 replies
-
When LuaLS works in workspace mode, all files in the same workspace are treated as if they are in the same single Lua runtime. As for supporting per-file environment, there are already many feature request:
But I guess under the current architecture / working mechanism of LuaLS, it is very difficult to implement May I ask why don't you just write I don't know much about LuaLS's plugin system, but seems it can transform the file buffer internally when the file is being processed inside LuaLS. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a bunch of files that declare a variable without marking it as local
Problem is that each of this files is executed in it's own context by the game, so
NewShipType
is not global, but LuaLS thinks it is. SoGo to definition
on some property ofNewShipType
shows list of all assignments of this property from all files instead of going to declaration of the field from class. Is there a way to mark variable as local without explicitly marking it as local?Maybe something like
Beta Was this translation helpful? Give feedback.
All reactions