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

BibLaTeX globbing patterns (\addbibresource[glob]{}) do not seem to read the .bib files under nvim #1125

Open
Thibaulltt opened this issue May 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Thibaulltt
Copy link

I'm currently using nvim with texlab to write a paper using the acmart document class.

Here is my main file:

\documentclass[...options...]{acmart}
\input{preamble}
\begin{document}
% ... snip ...

And here is the relevant part of my preamble.tex file:

% ... snip ...
\usepackage[backend=biber,datamodel=acmdatamodel,style=acmauthoryear]{biblatex}
\addbibresource[glob]{../../ressources/*.bib}
% ... snip ...

However, whenever I use a \{paren|text}cite command, texlab highlights the citation as an error, with the following message:

Lorem ipsum~\textcite{foo}
%                     ^^^ - texlab: Undefined reference

Even though I know the foo key is present in my bibliography files, and the latex files get compiled to a final PDF without issues.

Here are my texlab settings (in Lua, since I'm using nvim[-lspconfig]):

local texlab_settings = {
	texlab = {
		build = {
			executable = "latexmk",
			args = {
				"-pdflua",
				"-bibtex-cond", "-bibfudge",
				"-interaction=nonstopmode",
				"-auxdir=./build/", "-outdir=./build/",
				"-synctex=1", "%f"
			},
			forwardSearchAfter = false,
			auxDirectory = "./build/",
			logDirectory = "./build/",
			pdfDirectory = "./build/",
		},
		forwardSearch = {
			executable = "okular",
			-- Ref for Okular arguments: the TexLab GitHub Wiki. See:
			-- https://github.com/latex-lsp/texlab/wiki/Previewing#forward-search-2
			args = { "--unique", "file:%p#src:%l%f" },
		},
		completion = { matcher = "prefix-ignore-case" },
		experimental = {
			-- Include custom package dependencies into the dependency graph:
			followPackageLinks = true,
			-- List of *additional* environments to consider as enumeration/math/verbatim:
			enumEnvironments = {},
			mathEnvironments = {},
			verbatimEnvironments = { 'lstlisting', },
		},
	}
}

Any intuition what might prevent texlab from parsing my bib files?

@pfoerster
Copy link
Member

Any intuition what might prevent texlab from parsing my bib files?

Currently, the server does not expand glob patterns yet but supporting it should not be too difficult.

@pfoerster pfoerster added the enhancement New feature or request label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants