簡介
ZeroBrane Studio是一款支持代碼提示、語法高亮、遠程調試、代碼分析、調試等功能的輕量級Lua IDE工具。可以去官網studio.zerobrane.com進行下載。
自動補全功能
這里說的是如何讓你的代碼進行自動補全。
首先進入interpreters文件夾新建一個lua腳本文件配置你的庫的執行文件。
local exefile="執行文件路徑"
local resourcePath="資源路徑"
return {
name = "LuaApp",
description = "LuaApp",
api = {"baselib","LuaApp"},--注意api
frun = function(self,wfilename,rundebug)
local workdir=self:fworkdir(wfilename)
if not GetFullPathIfExists(workdir, 'main.lua') then
DisplayOutput("Can't find 'main.lua' file in the current project folder.\n")
return
end
if rundebug then
DebuggerAttachDefault({runstart = ide.config.debugger.runonstart == true})
end
local cmd = ('%s %s'):format(exefile, resourcePath)
return CommandLineRun(cmd,workdir,true,true)
end,
hasdebugger = true,
fattachdebug = function(self) DebuggerAttachDefault() end,
scratchextloop = true,
takeparameters = true,
}
打開編輯器在項目選項最后一項選擇你創建的lua的腳本對應的名稱,F5就可以啟動進行調試,注意入口文件需要是main.lua。
