charludo / projectmgr.nvim

Quickly switch between projects and automate startup tasks.
https://github.com/charludo/projectmgr.nvim
GNU General Public License v3.0
121 stars 4 forks source link

Problem with lsqlite3 #9

Closed ahmedaljaali closed 2 years ago

ahmedaljaali commented 2 years ago

Hello, how are you? I hope that you are doing well!

I have a problem when opening nvim, this massage pop up: 2022-08-13_17:52:34

charludo commented 2 years ago

Hi! Could be related to #8, do you have lsqlite3 installed on your machine?

ahmedaljaali commented 2 years ago

Yes, I installed it 2022-08-13_20:49:16

but it seems like it's trying to search for it in "usr/lib/lua/5.1/" instead of "usr/lib/lua/5.4/"

sagarc03 commented 2 years ago

@IZenithy you also need to install sqlite on your system, check

ahmedaljaali commented 2 years ago

Already installed

2022-08-13_22:31:00

sagarc03 commented 2 years ago

sorry i read the whole thing wrong!

I am assuming you are using packer when you install this plugin. Packer does this thing where it doesn't throw an error when installing rocks fail. And for some reason it uses your system python to install the all the rocks neovim requires, which points to python not python3. So if you don't have python in your path it fails

Do this to, and try to reinstall.

local packer = require("packer")
packer.init({
    luarocks = {
        python_cmd = "python3", -- or add the python virtual env you created for neovim doesn't matter
    },
})

add somewhere before you do the packer.startup

ahmedaljaali commented 2 years ago

I have changed it, but the error is still there

charludo commented 2 years ago

Please try updating (both the plugin and its config, see README), @sagarc03's PR could potentially have fixed this if it was indeed an issue with sqlite3 itself.

ahmedaljaali commented 2 years ago

I found the problem, Packer rocks don't work for some reason, so I installed it manually with this command:

sudo luarocks install --global --lua-version 5.1 lsqlite3complete
charludo commented 2 years ago

Alright! Sorry I couldn't be of help, but I'm glad you figured it out!