-
Notifications
You must be signed in to change notification settings - Fork 391
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
Bibtex citation completion requires full path of bib file #2184
Comments
TL;DR: your |
Apologies, I fixed that typo but the issue is still there. |
First: I've fixed the typo in your original post as well. Now, I'm curious if this could be an issue with the caching mechanism. Can you try to clear the cache with |
Yes clearing the cache solved the issue, the relative path opens the citation completion menu. Thank you for your help! |
Important: This updates the caching mechanism for vimtex#kpsewhich#find to avoid cache conflicts for local results. It means that after updating, one must clear the kpsewhich cache with: :VimtexClearCache kpsewhich refer: #2184
Great, happy to hear it. However, you actually found a bug here. I've fixed it, but after updating, you will need to clear the cache again. |
Just to add to this for potential interested readers, including future self: It seems more or less common to use the same name for reference file in different projects, e.g. |
Description
When trying to complete citations with bibtex, I was running into errors when I simply included the file name of the bib file. My bib files are located in my texmf tree directory, and are found by kpsewhich. However, in order for citation completions to work in vimtex I need to use the full path of the bib file.
E.g. merely having
\addbibresource{somefile.bib}
does not make the citation completion menu appear when I press <C-x><C-o>, but I need to include the whole path,\addbibresource{~/Library/texmf/bibtex/bib/somefile.bib}
.Steps to reproduce
nvim -u minimal.vim minimal.tex
\addbibresource{somefile.bib}
"\cite{}
Here is the `minimal.vim` file
Here is the `minimal.tex`
Expected behavior
The citation completion menu should pop up with all of the bibliography entries in
somefile.bib
Actual behavior
There is no citation completion when using
\addbibresource{somefile.bib}
, but there is citation completion when using\addbibresource{~/Library/texmf/bibtex/bib/somefile.bib}
.However, compilation works on both versions without error and
kpsewhich somefile.bib
returns the location, the only issue is in completion.Do you use a latexmkrc file?
No
VimtexInfo
The text was updated successfully, but these errors were encountered: