jalvesaq / zotcite

Neovim plugin for integration with Zotero
GNU General Public License v3.0
177 stars 15 forks source link

Use the same telescope logic to select author prior to annotations. #91

Closed adam-coates closed 3 months ago

adam-coates commented 3 months ago

As title suggests really. The same telescope logic is applied now to select the author prior to the selection of an annotation and also to importing all annotations.

(I would make another pull request after this one to also allow :Zseek to return the citation key now I have figured out how to return something from telescope, but it shouldn't replace cmp-zotcite)

jalvesaq commented 3 months ago

I was also working on this yesterday. I will upload my branch, so we can compare with your pull request and choose the best parts of each.

jalvesaq commented 3 months ago

I messed my branch. So, let's work on your pull request...

jalvesaq commented 3 months ago

We should have only one Telescope dialog for everything. You created two. I like more the one with Author-Year-Title in the list than the one with only Author-Year.

adam-coates commented 3 months ago

Yeah I also like Author-Year-Title. I created two because I also wasn't sure on how the best functionality would be, and if each one should function differently. But if they both should be the same then let's keep to one function only.

Unfortunately I might be away from my computer much of the coming week, so please excuse my late replies with this.

jalvesaq commented 3 months ago

The second step of :Zselectannotations was working better before the last change.

There is a recommendation that pull requests be made from branches other than the main branch. If you had made the changes in a different branch it would be easier to see the differences with the command :DiffviewOpen main from sindrets/diffview.nvim plugin.

jalvesaq commented 3 months ago

The sel_list variable and the use of indexes was a workaround to use vim.ui.select. Using Telescope directly we may not need it anymore.

jalvesaq commented 3 months ago

The name seek.FindCitationKey is redundant (seek = find). I think we could keep the name seek.refs.

jalvesaq commented 3 months ago

:Znote and :Zpdfnote also have to call seek.refs.

jalvesaq commented 3 months ago

The second step of :Zselectannotations was working better before the last change.

The problem was that I had commented out the ui-select extension of Telescope.

adam-coates commented 3 months ago

Great thanks for also working on this one! Appreciated!