notZaki / PandocCiter

Visual Studio Code extension for autocompleting citations and cross-references for Pandoc/Markdown documents
https://marketplace.visualstudio.com/items?itemName=notZaki.pandocciter
MIT License
66 stars 9 forks source link

Provide autocompletion for custom BibEntries #12

Closed smartens closed 4 years ago

smartens commented 4 years ago

Problem I have to use a custom BibEntry for Standards but I can't select this custom BibEntry in autocompletion. I noticed that the BibTex Entries are hardcoded in https://github.com/notZaki/PandocCiter/blob/master/src/providers/completer/citation.ts. The version of latex workshop https://github.com/James-Yu/LaTeX-Workshop/blob/master/src/providers/completer/citation.ts does read all the entries from the actual bibtex.

Expected behavior I want to autocomplete custom BibEntries.

notZaki commented 4 years ago

It looks like LaTex-Workshop uses the latex-utensils package to parse the bib files.

I adapted their code into the current master. Before publishing it, I would appreciate it if you could try it out and check if it solves the issue.

The extension can be built by cloning this repository, installing the dependencies using npm install and then running it through vscode's debugger. Alternatively, this zip file contains a pre-built vsix file.

smartens commented 4 years ago

It works :) ... I used the pre-built file. Thanks 👍

notZaki commented 4 years ago

Thanks for testing it out. I re-labeled and published this version as 0.5.0.