Skip to content

Instantly share code, notes, and snippets.

@NixImagery
Last active April 15, 2024 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NixImagery/ee7ef17e602a3dbf558e2dc2b0a0d266 to your computer and use it in GitHub Desktop.
Save NixImagery/ee7ef17e602a3dbf558e2dc2b0a0d266 to your computer and use it in GitHub Desktop.
pandoc throws "file not found" for defaults.yml

Occurs in visual studio code, using pandoc citer extension. Typing '@' in the editor throws an error, reporting the file 'default.yml' is missing.

Resolution is to provide the file. First, find the pandoc data directory:

% pandoc -v
pandoc 3.1.12.3
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /Users/dave/.local/share/pandoc
Copyright (C) 2006-2023 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

Now, create that directory if required, and the missing file.

% mkdir ~/.local/share/pandoc # if required
% touch ~/.local/share/pandoc/defaults.yml

Restart visual studio and check it works -- type '@' in an editor. No error should be thrown and the extension should offer the list of citation codes as usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment