papis / papis-vim

A vim package to interact with vim
GNU General Public License v3.0
16 stars 4 forks source link

Papis command freezing #6

Open JBlocklove opened 4 years ago

JBlocklove commented 4 years ago

When I run the command :Papis I seem to visually get my library, but I can't seem to interact with it at all. If I start to type, what I type appears, but nothing else moves. If I hit enter, the entire pane goes blank and if I hit enter again I get a blank \cite{}.

During this whole time, there is a spinning "loading status" type thing in the top left corner which constantly has a 0/0 next to it. I'm not really sure what that means, but it looks like something isn't getitng read in correctly.

JBlocklove commented 4 years ago

In poking around a bit more, it seems this is likely connected to papis/papis#254

The ref field in the info.yaml file isn't getting filled out for me, and since that's what the plugin looks at for references, it's causing some issues. That's my best guess, at least.

JBlocklove commented 4 years ago

Turns out that's not necessarily the issue. I just manually added the ref field back to each document in my library and the same problem persists.

koalp commented 4 years ago

I have the same issue, and I think there are two causes to this issue :

Hardcoded ref

You have 'solved' it by adding references to each document , but this is definitely an issue.

Interactive papis

The interactive papis selector is used when using papis list, even if the --format option is used. I don't know if this is a wanted behaviour or not. It can be solved by using the --all option.

I managed to mitigate the issue by changing the plugin/papis.vim file, and adding the --all option as shown below

diff --git plugin/papis.vim plugin/papis.vim
index 6a3c294..89999ea 100644
--- plugin/papis.vim
+++ plugin/papis.vim
@@ -64,7 +64,7 @@ function! s:Papis(searchline)
       let l:searchinp = '"*"'
     endif
   endif
-  call fzf#run(fzf#wrap({'source': 'papis list ' . l:searchinp . ' --format ' . g:PapisFormat . ' @{doc[ref]}"', 'sink*': function('s:handler'), 'options': '--multi --expect=ctrl-y --print-query'}))
+  call fzf#run(fzf#wrap({'source': 'papis list ' . l:searchinp . ' --format ' . g:PapisFormat . ' @{doc[ref]}"' . ' --all', 'sink*': function('s:handler'), 'options': '--multi --expect=ctrl-y --print-query'}))
 endfunction

 command! -bang -nargs=* Papis call s:Papis('<args>')

However, it's still an hacky patch and might not be the proper way to solve the issue.

JBlocklove commented 4 years ago

Yeah, that's definitely not the most ideal patch, but at least it's a solution for now. I'm going through and trying to make my own papis plugin to replace this, since I don't really see the need for fzf here, and it seems kinda bloated to me on the whole. Currently it only works for nvim and it's minimally tested, but it does technically work, at least for me.

nesaro commented 1 year ago

I experienced the same issue. I had it working fine until I upgraded my vim plugins and system fzf.

I tried with both neovim 0.5.0 and 0.7.2, fzf 0.35 and 0.24 but they all are the same.

I assume it is the vim terminal window and fzf not liking either of the picktools from papis and expecting a list of entries.

adding --all to the papis list call fixed the picker for me too