-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hi, the plugin extension seems to not be working for me, citations/references are not showing up, instead empty telescope window with Bibtex References
as shown below.
Below the configurations and the empty window image is the .bib
file.
.bib
files (a single file):
local telescope_bibdir = vim.fn.expand("~/library/texmf/bibtex/bib")
local bibfiles = {
telescope_bibdir .. "/Zotero.bib"
}
In require("telescope").setup(config}
the config.pickers.buffers.extensions.bibtex
:
{
-- Depth for the *.bib file
depth = 1,
-- Custom format for citation label
custom_formats = {},
-- Format to use for citation label.
-- Try to match the filetype by default, or use 'plain'
format = "",
-- Path to global bibliographies (placed outside of the project)
global_files = bibfiles,
-- Define the search keys to use in the picker
search_keys = { "author", "year", "title" },
-- Template for the formatted citation
citation_format = "{{author}} ({{year}}), {{title}}.",
-- Only use initials for the authors first name
citation_trim_firstname = true,
-- Max number of authors to write in the formatted citation
-- following authors will be replaced by "et al."
citation_max_auth = 2,
-- Context awareness disabled by default
context = true,
-- Fallback to global/directory .bib files if context not found
-- This setting has no effect if context = false
context_fallback = true,
-- Wrapping in the preview window is disabled by default
wrap = false,
},
The autocommand that loads the extension:
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "*.tex", "*.md" },
callback = function()
require("telescope").load_extension("bibtex")
end,
})
Packer config:
use({
"nvim-telescope/telescope-bibtex.nvim",
requires = {
{ "nvim-telescope/telescope.nvim" },
},
ft = {"tex", "markdown"},
})
The empty window after running :Telescope bibtex
:
The .bib
file exported by Zotero:
@article{Knott1989,
title = {Hash Table Collision Resolution with Direct Chaining},
author = {Knott, Gary D and family=Torre, given=Pilar, prefix=de la, useprefix=false},
date = {1989-03-01},
journaltitle = {Journal of Algorithms},
shortjournal = {Journal of Algorithms},
volume = {10},
number = {1},
pages = {20--34},
issn = {0196-6774},
doi = {10.1016/0196-6774(89)90021-7},
url = {https://www.sciencedirect.com/science/article/pii/0196677489900217},
urldate = {2024-10-19},
abstract = {The hash table method called direct chaining, wherein chains of items with the same hash function value are kept in a single table without recourse to an index table or a separate overflow area, is described. An explicitly linked free-space list is used which allows arbitrary insertion and deletion sequences to be done indefinitely with no performance degradation. When a singly linked free-space list is employed, the interaction of stored items appearing embedded in the free-space list and in the chains of overflow items leads to an intricate situation when we count the expected number of probes to distinct cells in the hash table made while inserting a new item. This difficulty is explored, and an exact analysis is carried out.},
}
@book{sullivanAlgebraTrigonometry,
title = {Algebra and {{Trigonometry}}},
author = {Sullivan, Michael},
edition = {11}
}
Metadata
Metadata
Assignees
Labels
No labels