Bibliography management for Neovim via LSP. Provides completion, hover, go-to-definition, and code actions for citation keys in Markdown and LaTeX documents.
- LSP server — completion, hover, go-to-definition for
@citekeyreferences - Automatic backend dispatch —
.bibfiles via tree-sitter, Zotero via sqlite - Composite key conceal —
@ABC123#citekey→ hides the ID, shows only the citekey :Bib search— fuzzy picker over the active backend (zoterofor Zotero-only)- Code actions — Open PDF and Get notes from Zotero for citations
- Markdown + LaTeX — YAML frontmatter,
\addbibresource,.bib.json,!TeX root
With vim.pack (Neovim 0.12+):
vim.pack.add({
"https://github.com/phrmendes/bib.nvim",
"https://github.com/kkharji/sqlite.lua",
})Requires pandoc and sqlite.lua. Zotero users also need BetterBibTeX for citation key generation.
Tree-sitter parsers required: bibtex, latex, markdown, markdown_inline, yaml.
require("bib").setup({
filetypes = { "markdown", "tex" },
zotero = { database = "/path/to/zotero.sqlite" },
})The Zotero database path is auto-detected from the default location if not specified.
Add a bibliography field to your Markdown frontmatter:
---
bibliography: refs.bib
---
See @smith2020 for details.Or use \addbibresource in LaTeX:
\documentclass{article}
\addbibresource{refs.bib}
\begin{document}
See \cite{smith2020}.
\end{document}Or place a .bib.json file in the project root:
{ "bibliography": "refs.bib" }:Bib search— search the current backend and open the reference:Bib search zotero— search Zotero only
Triggered on a citation line:
- Open PDF — opens the attached PDF in the system viewer
- Get notes from Zotero — inserts Zotero notes below the citation as plain text
- BetterBibTeX for Zotero — citation key generation
- pandoc — Zotero note extraction
- sqlite.lua — Zotero database access
Zotero note extraction inspired by zotcite.
Apache-2.0