Skip to content
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

cmp source for completing references #9

Open
avonmoll opened this issue Nov 1, 2022 · 2 comments
Open

cmp source for completing references #9

avonmoll opened this issue Nov 1, 2022 · 2 comments

Comments

@avonmoll
Copy link

avonmoll commented Nov 1, 2022

Thanks for making this plugin - it's awesome so far. When I'm in a markdown file, for example, it would be great to be able to do autocompletion of citation tags. Suppose I have a document in my papis library with the field ref: smith1992optimal, and I'm editing a markdown document in which I want to cite this reference. One option, which currently works is to type @| (the pipe character denotes the cursor position) and then enter Normal mode and hit Spacepp to open the papis.nvim telescope picker, begin typing smith19... and the fuzzy finder eventually matches and then hit enter, which puts smith1992optimal at the cursor position. My suggestion is to feed the refs as a source for cmp - that way, one need not exit Insert mode to search/match/input the desired citation.

@jghauser
Copy link
Owner

jghauser commented Nov 1, 2022

Thanks for the feedback! :)

This is definitely something I think should be part of the feature set eventually -- I just don't know when I'll get to it. There's a lot of other stuff on the list too (currently I'm writing tests) so it might take some time. If you want to write a PR, I would of course be happy to merge (and give feedback/input).

In the meantime, you could also use the insert mappings for Telescope (by default <c-p>p), this will allow you avoid the roundtrip through normal mode.

@jghauser
Copy link
Owner

jghauser commented Jun 7, 2023

maybe we can take some inspiration from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants