ZeroBrane Lua腳本編輯器代碼自動補全


簡介    

    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。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM