Skip to content

A source for nvim-cmp, providing completion for bibliography, reference and cross-ref items in Pandoc/Markdown.

Notifications You must be signed in to change notification settings

jc-doyle/cmp-pandoc-references

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

cmp-pandoc-references

A source for nvim-cmp, providing completion for bibliography, reference and cross-ref items.

Demo

cmp-pandoc-references

Note I have overridden the ItemKinds, they are set to cmp.lsp.CompletionItemKind.Reference by default.

Installation & Usage

Assuming Packer:

use({
  "hrsh7th/nvim-cmp",
  requires = {
    { "jc-doyle/cmp-pandoc-references" }
  }
})

Add the source:

require('cmp').setup {
  sources = {
    { name = 'pandoc_references' }
  }
}

Explanation & Limitations

This source parses and validates the bibliography: [your/bib/location.bib] YAML metadata field, to determine the destination of the file (see Pandoc). If it is not included (or you specify it through a command-line argument), no bibliography completion items will be found.

(I use the metadata block to reference bibliographies, if you'd like automatic scanning of directories/sub-directories, feel free to submit a PR)

About

A source for nvim-cmp, providing completion for bibliography, reference and cross-ref items in Pandoc/Markdown.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages