Skip to content

Commit ed38de1

Browse files
committed
fix(addon-loader): add callback stubs
1 parent 83e18fe commit ed38de1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/luarocks/lls-addon-loader.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@ if fs.exists(lua_modules:string()) then
2222
table.insert(cfg.rocks_trees, 1, { name = "project", root = lua_modules:string() } --[[@as luarocks.core.Tree]])
2323
end
2424

25+
-- because of how `plugin.dispatch` works, leaving these functions undefined
26+
-- means plugins defined later can't use these callbacks!
27+
-- all thanks to this line: https://github.com/LuaLS/lua-language-server/blob/0187ddf19f940d8b9b95d916d73f4660ec417471/script/plugin.lua#L35
28+
29+
function OnSetText() end
30+
function OnTransformAst() end
31+
function ResolveRequire() end
32+
2533
print("luarocks-build-lls-addon: loader finished!")

0 commit comments

Comments
 (0)