Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>LuaRequireNew to Visual Studio Code? Get it now.
LuaRequire

LuaRequire

linzzzer

|
51 installs
| (1) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

luarequire README

Features

  • shortcut "alt+a" can quick fix the require function that allow you require any where without navigate into file header.
  • setting luarequire.searchPath config package.path which will root the modules. default root path is["Logic","Framework","HFModule","Settings","ToLua"] that you can modify as you like.

luarequire-help

Origin Code :

function Test()
    local id = 0
    local bagModule = require("Logic.Bag.BagModule") -- 可以通过emmulyLua补全
    local bag = bagModule.GetBagById(id)
    bag.BuySomething()
end

After alt+a :

local BagModule = require("Bag.BagModule")

function Test()
    local id = 0
    local bagModule = BagModule
    local bag = bagModule.GetBagById(id)
    bag.BuySomething()
end
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft