mistricky / codesnap.nvim

📸 Snapshot plugin with rich features that can make pretty code snapshots for Neovim
MIT License
473 stars 15 forks source link

[Fix] dynamic import generator to avoid initial module not found error #60

Closed mistricky closed 2 months ago

mistricky commented 2 months ago

CodeSnap.nvim use FFI as approach of load rust module into Lua, the Codesnap.nvim would compile Rust lib as a middle link file named generator.so which expose interface same with C Lua module.

But If users never installed CodeSnap.nvim before, the generator.so does not exist when users first installed, so this PR change the import way of codesnap.so to dynamic import to avoid "Module not found" error