jghauser/papis.nvim

Opening files should respect papis config

Closed this issue · 1 comments

Currently when I am hovering over a citation and hit <leader>po to open the associated PDF it opens up in Adobe (which is my system's default). However, I usually use rifle to open most things and I have a different PDF reader set as my default there. In my papis config I have opentool = rifle and when I run, e.g., papis open from the command line the PDF opens in my desired reader. I am thinking that papis.nvim should adhere to the configuration of papis itself (although maybe this can be debated).

BTW, I love this package!

Thanks for the feedback! :) You're right, it makes sense for papis.nvim to adhere to whatever options are set in papis. The issue is that getting config values automatically from papis.nvim is very slow so I've been asking users to copy over the relevant options to papis.nvim. Basically the stuff here:

  papis_python = {
    dir = "/path/to/my/library",
    info_name = "info.yaml", -- (when setting papis options `-` is replaced with `_`
                             -- in the keys names)
    notes_name = [[notes.norg]],
  },

Do you think having another (optional) opentool config option would be suitable for you? Maybe in the future, we can have an ImportPapisConfig command and then store the settings in the papis.nvim database for persistence (and do so automatically on first run), but I'll have to see when I can get to that...