jghauser / papis.nvim

Manage your bibliography from within your favourite editor
GNU General Public License v3.0
145 stars 8 forks source link

Trouble running package on macos (apple silicon) #82

Open avonmoll opened 1 week ago

avonmoll commented 1 week ago

I had a working setup on my previous intel-based macos. Since migrating to the new machine, I cannot get papis.nvim to work. One thing that was necessary at some point was to install an arm64-specific version of sqlite3. Previously, I had in my config:

 vim.g.sqlite_clib_path = "/Users/.../homebrew/opt/sqlite/bin/sqlite3"

but running :checkhealth papis showed that it couldn't find the associated library, so I switched to

vim.g.sqlite_clib_path = "/Users/.../homebrew/opt/sqlite/lib/libsqlite3.dylib"

Now, running :checkhealth papis shows

papis: require("papis.health").check()

- ERROR Failed to run healthcheck for "papis" plugin. Exception:
  .../.local/share/nvim/lazy/papis.nvim/lua/papis/health.lua:26: attempt to index field 'data' (a nil value)

I went ahead and deleted the previous papis_db folder from ~/.local/share/nvim in case that folder (copied from previous mac) was causing issues. So it looks like something in the papis/sqlite-wrapper.lua file isn't running correctly, but that's about all I can figure out on my end.

jghauser commented 6 days ago

Thanks for the report! First, are you sure that papis.nvim has been loaded before you ran :checkhealth papis. I get your error if I run checkhealth before papis.nvim is loaded by a configured filetype. This in itself is a problem, but I don't think it is related to your main issue. Second, can you try running papis.nvim with the debug module (as described in the README) and check if the log has any pointers to where things fail? I doubt it will as the issue seems to be with the sqlite.lua dependency, but it doesn't hurt to be sure :).