Together to improve this extension GitHub.
support lua4.x upvalue
Goto Definition (function and some variable)
List Document Symbols (now only list function)
if you want find defintion from other files, you need set the lua path to workspace settings
file search ?, ?.lua, $luapath/?,$luapath/?.lua, $workspaceroot/?, $workspaceroot/?.lua
workspace settings
{
"luaforvscode.luapath":"C:\\Project;C:\\luapath2",
"luaforvscode.includekeyword":"Include,Require,require,dofile,include",
"luaforvscode.luaversion":4
}
test1.lua
here search $luapath/script/test2.lua, $workspaceroot/script/test2.lua, /script/test2.lua
Include("\\script\\test2.lua") --or Require("\\script\\test2.lua") or dofile("\\script\\test2.lua") later you can custom this keyword
main()
test2.lua
function main()
end
not support this case now, because hard to know what's type tbsub and the type of tb.new return
if you have a solution please tell me, thanks
tb = {}
function tb:new()
return tb
end
function tb:dofunc()
end
tbsub = tb:new()
tbsub:dofunc()
Version 0.0.23
reduce disturbing user
change lua error from vscode.windows to output( view->output)
parsing script when frist time go to definition or show symbol
parsing script when save document