I think we’re close now. The attached patch should be ready to install or at least review. Use of advice has been removed, byte-compiler and checkdoc warnings are fixed and tests have been added. For the tests I just copied the lua-ts-mode files and adjusted for the current state of lua-mode. Once landed I’ll follow up with some improvements and work out how to share code between the Lua modes (following the Ruby model unless there is some other preference).