codemp/dist/lua
2024-09-10 14:01:09 +02:00
..
annotations.lua fix(lua): add type hints for poll_callback 2024-09-06 13:21:19 +02:00
codemp-0.0.1-2.rockspec fix(lua): fetch from remote 2024-09-10 14:01:09 +02:00
codemp.lua build(lua): add rockspec 2024-09-10 13:57:50 +02:00
README.md build(lua): add rockspec 2024-09-10 13:57:50 +02:00

Lua bindings

Lua allows directly requireing properly constructed shared objects, so glue code can live completely on the Rust side.

The Lua-compatible wrappers are built with mlua.

To build, just cargo build --release --features=lua and rename the resulting libcodemp.so / codemp.dll / codemp.dylib in codemp_native.so/dll/dylib. This is important because Lua looks up the constructor symbol based on filename.

Type hints are provided in annotations.lua, just include them in your language server: ---@module 'annotations'.

LuaRocks

codemp is available as a rock on LuaRocks

Manual bundling

LuaRocks compiles from source, which only works if have the rust toolchain available. To provide a reasonable NeoVim experience, we provide pre-built binaries.

Download latest build and annotations from here

You will need a loader file to provide annotations: you can use provided codemp.lua