-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlite.lua doesn't seem to work with this. #4
Comments
🤔 that's odd, couldn't reproduce. I'm on NVIM v0.7.0-dev |
So...I was able to track it down. If you manage to in some way install telescope-smart-history and have not yet gotten sqlite.lua working (if, for example, you don't have the sqlite binaries on your machine when you first install it), then telescope-smart-history will create a garbage sqlite file. And from that point on, it will fail even if you get your machine set up as intended until you delete that garbage file. |
Well done @fireboy1919, Interesting bug, any ideas to prevent it? |
BTW, I also produced this error with telescope-frecency This seems like something that should actually be built into sqlite.lua, but I can think of two defensive approaches that would prevent this bug:
This would unfortunately mean specifically keeping track of the case when you are first creating a file rather than entirely treating the database API as handling all file operations itself, but even so, it's not going to affect performance very much so that's probably okay.
Alternatively, this problem probably doesn't need to be actually prevented since it's easy for a user to fix. It just needs to be detected. If sqlite fails to load, there should be a better error message logged somewhere informing the user that sqlite.lua couldn't load the extension. |
Hi @fireboy1919, I got the same error, but do not know the path of the garbage file. Could you tell me its path? |
In my case i needed to install libsqlite3-dev on ubuntu. To check if its ok run inside nvim after install sqlite.lua:
|
I specified the path to the file in the telescope sqlite file as I showed in my config... |
He means the one that u set in the path:
So just delete telescope_history.sqlite3 |
NVIM v0.6.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Latest version of all the lua libraries.
This is my reduced packer config:
Telescope setup:
The text was updated successfully, but these errors were encountered: