Lua package for NeoVim plugin

I would like to use a neovim plugon, nvim-agda, but it requires the luautf8 library. Is there a way I can install that library so that neovim is aware of it?

luautf8 is on nixpkgs, I guess you can install it and just add it to the lua path, something like package.path = '/nix/store/xxx-luautf/?.lua;' .. package.path in your init.lua

If you use nix to manage your neovim plugins, the right solution is to add nvim-agda plugin to nixpkgs and in the overrides ( add the luautf8 dependecy

Thank you very much! This works almost. For posterity, the exact solution is the following:

The /nix/store/xxx-luautf/ folder only contains the compiled .os file, not the actual .lua files, so you have to add it to your package.cpath. Hence the line to add to init.lua:

package.cpath = "/nix/store/xxx-luautf8/lib/lua/5.1/lua-utf8.os" .. package.cpath
1 Like