MasterTemple / bible.nvim

Integrate the Bible into the Neovim text editor
MIT License
9 stars 1 forks source link

Automatically Install Luarocks Packages #1

Open MasterTemple opened 1 year ago

MasterTemple commented 1 year ago

The extension should automatically install lsqlite3 and dkjson.

DevelopmentIntensified commented 7 months ago

3

FreeKev commented 2 months ago

The extension should automatically install lsqlite3 and dkjson.

Ah yes. Should alternatively or additionally update the README to account for what needs to be installed.

E5108: Error executing lua ...i/lazy/telescope.nvim/lua/telescope/_extensions/in it.lua:10: 'bible' extension doesn't exist or isn't installed: ...bible.nvim/lua /telescope/_extensions/bible/reference.lua:1: module 'lsqlite3' not found: no field package.preload['lsqlite3']

On another note - this looks great! Thank you for your work @MasterTemple

MasterTemple commented 1 month ago

@FreeKev Thanks to Claude, I learned that the necessary packages can be automatically installed with Lazy.nvim by adding this plugin:

{
    "nvim-lua/plenary.nvim",
    dependencies = {
        {
            "theHamsta/nvim_rocks",
            build = "pip3 install --user hererocks && python3 -mhererocks . -j2.1.0-beta3 -r3.0.0 && cp nvim_rocks.lua lua",
            config = function()
                local nvim_rocks = require("nvim_rocks")
                nvim_rocks.ensure_installed("lsqlite3")
                nvim_rocks.ensure_installed("dkjson")
            end,
        },
    },
},

I will update the README.

MasterTemple commented 1 month ago

It seems to give me this error:

Unable to load the luarocks package loader. Try re-running the build stage (`:Lazy build luarocks.nvim`). Full trace: ...cal/share/nvim/lazy/nvim_rocks/lua/luarocks/core/cfg.lua:713: attempt
 to concatenate field 'LUA_BINDIR' (a nil value)
Press ENTER or type command to continue

but it does at least work when I dismiss the error message.

I need to figure out if I should resolve the error or if I should just hide it.