{"id":50831399,"url":"https://github.com/barewalker/fzfcite.nvim","last_synced_at":"2026-06-13T23:31:03.445Z","repository":{"id":353435789,"uuid":"1219047106","full_name":"barewalker/fzfcite.nvim","owner":"barewalker","description":"Lightweight citation picker for Neovim, powered by fzf-lua. Zotero-free, plain-YAML workflow.","archived":false,"fork":false,"pushed_at":"2026-04-23T21:36:30.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-23T23:24:20.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barewalker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-23T13:28:43.000Z","updated_at":"2026-04-23T21:36:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/barewalker/fzfcite.nvim","commit_stats":null,"previous_names":["barewalker/fzfcite.nvim"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/barewalker/fzfcite.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barewalker%2Ffzfcite.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barewalker%2Ffzfcite.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barewalker%2Ffzfcite.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barewalker%2Ffzfcite.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barewalker","download_url":"https://codeload.github.com/barewalker/fzfcite.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barewalker%2Ffzfcite.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34304628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-13T23:31:02.642Z","updated_at":"2026-06-13T23:31:03.437Z","avatar_url":"https://github.com/barewalker.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fzfcite.nvim\n\nA lightweight citation picker for Neovim, powered by [`fzf-lua`](https://github.com/ibhagwan/fzf-lua).\n\nKeep your bibliography as a plain YAML (or any grep-friendly) file, then insert citation keys and open attached PDFs from Neovim in a couple of keystrokes. No Zotero, no SQLite, no background daemons.\n\nDesigned for lightweight Typst / Markdown / plain-text writing workflows.\n\n## Features\n\n- Insert `@citekey` (or any configurable format) via `fzf-lua`.\n- Open the PDF associated with a citation key — either from the picker (`ctrl-o` by default) or directly from the citation key under the cursor.\n- Jump into the ref file at the selected entry (`ctrl-y` by default) to read the full bibliography block.\n- Configurable ref-file and PDF search paths (first match wins).\n- Configurable citation prefix/suffix (supports `@key`, `[@key]`, `{key}`, etc.).\n- Configurable grep pattern and key extractor for custom bibliography formats.\n- Falls back to the system clipboard when the current buffer is not writable (e.g. dashboards).\n\n## Requirements\n\n- Neovim 0.9+\n- [`ibhagwan/fzf-lua`](https://github.com/ibhagwan/fzf-lua)\n- `grep` (POSIX)\n- A PDF viewer invoked via `xdg-open` / `wslview` / `open` (override with `opener`)\n\n## Installation\n\n### lazy.nvim\n\n```lua\n{\n  \"barewalker/fzfcite.nvim\",\n  dependencies = { \"ibhagwan/fzf-lua\" },\n  ft = { \"typst\", \"markdown\", \"yaml\" },\n  config = function()\n    require(\"fzfcite\").setup({\n      -- your settings\n    })\n  end,\n}\n```\n\n## Default configuration\n\n```lua\nrequire(\"fzfcite\").setup({\n  -- First readable path wins. Relative paths are resolved against cwd.\n  ref_files = { \"ref.yml\", \"~/refs/ref.yml\" },\n\n  -- PDFs are looked up as `\u003ckey\u003e.pdf` in these directories, in order.\n  pdf_dirs  = { \".\", \"~/refs/pdfs\" },\n\n  citation = {\n    prefix = \"@\",    -- inserted before the key\n    suffix = \"\",     -- inserted after the key\n\n    -- grep pattern passed to `grep -H -n` against the ref file.\n    -- Default matches top-level YAML keys (e.g. `smith2020:`).\n    grep_pattern = \"^[a-zA-Z0-9].*:$\",\n\n    -- Parse one line of `grep -H -n` output and return the citation key.\n    extract_key = function(line)\n      return line:match(\"^[^:]+:%d+:(.+):$\")\n    end,\n  },\n\n  -- nil = auto-detect: `open` on macOS, `wslview` on WSL, else `xdg-open`.\n  opener = nil,\n\n  fzf = {\n    prompt    = \"Citations\u003e \",\n    previewer = \"builtin\",\n    winopts   = {\n      height  = 0.85,\n      width   = 0.80,\n      preview = { layout = \"vertical\" },\n    },\n    -- Key in the picker that opens the PDF instead of inserting.\n    open_pdf_key = \"ctrl-o\",\n    -- Key in the picker that opens the ref file at the selected entry.\n    view_ref_key = \"ctrl-y\",\n    -- Forwarded as-is to the underlying fzf binary via fzf-lua.\n    -- Useful for custom `--bind` entries, e.g. to make ctrl-h behave as\n    -- backspace inside the prompt (otherwise fzf-lua may steal it for\n    -- window navigation):\n    --   fzf_opts = { [\"--bind\"] = \"ctrl-h:backward-delete-char\" },\n    fzf_opts = {},\n  },\n})\n```\n\n## Commands\n\n| Command | Description |\n|---|---|\n| `:FzfciteInsert` | Open the fzf-lua picker to insert a citation. `\u003cEnter\u003e` inserts (falls back to clipboard if the buffer is not writable), `ctrl-o` opens the PDF, `ctrl-y` opens the ref file at the selected entry. |\n| `:FzfciteOpenPdf [key]` | Open the PDF for `[key]`, or for the `\u003ccword\u003e` under the cursor if no argument is given. |\n\n## Example keymaps\n\n```lua\nvim.keymap.set(\"n\", \"\u003cleader\u003eci\", \"\u003ccmd\u003eFzfciteInsert\u003cCR\u003e\",  { desc = \"Citation: Insert\" })\nvim.keymap.set(\"n\", \"\u003cleader\u003ecp\", \"\u003ccmd\u003eFzfciteOpenPdf\u003cCR\u003e\", { desc = \"Citation: Open PDF under cursor\" })\n```\n\n## Ref file format\n\nOut of the box, `fzfcite.nvim` expects a YAML file where each top-level key is a citation key:\n\n```yaml\nsmith2020:\n  title: Example paper\n  author: Smith, J.\n  year: 2020\n\ndoe2021:\n  title: Another paper\n  author: Doe, J.\n```\n\nWith the defaults, `smith2020.pdf` is expected under one of the configured `pdf_dirs`.\n\n## Customizing for other bibliography formats\n\n`grep_pattern` + `extract_key` together define \"how do we list the keys\". A few examples:\n\n### BibTeX (`@article{key, ...}`)\n\n```lua\nrequire(\"fzfcite\").setup({\n  ref_files = { \"refs.bib\", \"~/refs/refs.bib\" },\n  citation = {\n    grep_pattern = \"^@[a-zA-Z]+{[^,]+,\",\n    extract_key = function(line)\n      return line:match(\"^[^:]+:%d+:@[a-zA-Z]+{([^,]+),\")\n    end,\n  },\n})\n```\n\n### Pandoc-style `[@key]` output\n\n```lua\nrequire(\"fzfcite\").setup({\n  citation = {\n    prefix = \"[@\",\n    suffix = \"]\",\n  },\n})\n```\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarewalker%2Ffzfcite.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarewalker%2Ffzfcite.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarewalker%2Ffzfcite.nvim/lists"}