DevScholar ๐ŸŽ“

September 13, 2026 ยท View on GitHub

Your Code, Connected to Knowledge.

DevScholar automatically detects research paper references (arXiv, DOI, IEEE, PubMed, Semantic Scholar, OpenAlex) in your code comments and links them to the source. Hover to see abstracts, authors, and citations, or preview the full PDF directly inside VS Code.

DevScholar Demo

๐Ÿš€ Getting Started

  1. Install the extension.
  2. Open any code file.
  3. Add a comment with a paper reference:
    # See transformer architecture: arxiv:1706.03762
    def attention(q, k, v): ...
    
  4. Hover over the ID or click "Preview PDF".

โœจ Features

Paper IDs in your comments are highlighted and made clickable. Supported formats:

  • arXiv: arxiv:1706.03762, [arxiv:1810.04805], or full URLs
  • DOI: doi:10.1038/nature14539 or https://doi.org/...
  • IEEE: ieee:726791 or Xplore URLs
  • PubMed: pmid:12345678
  • Semantic Scholar: Full URLs (e.g., semanticscholar.org/paper/...)
  • OpenAlex: openalex:W1234567890

โ„น๏ธ Rich Metadata Hover

Hover over any link to see:

  • Title & Authors
  • Abstract / Summary
  • Publication Date
  • Citation Count

Metadata is cached locally (7 days by default) so repeated lookups are instant.

๐Ÿ“„ In-Editor PDF Preview

Click "Preview PDF" (CodeLens or Hover) to read the full paper without leaving your editor.

  • Rendered with PDF.js inside a webview.
  • Works with arXiv, IEEE (open access), and DOI references (via OpenAlex fallback).
  • Only offered when a PDF is actually available.

๐Ÿ” Click-to-Cite

Search and cite papers by name directly from your editor:

  • Type #cite:, @cite:, or cite: followed by your search query
  • A real-time dropdown shows matching papers from OpenAlex
  • Select a paper to insert a properly formatted citation
  • Language-aware comment prefixes (40+ languages supported)
  • Or use Cmd+Shift+C (Mac) / Ctrl+Shift+C (Windows) to open the search panel
# Type: #cite:attention transformer
# Get:
# "Attention Is All You Need"
# arxiv:1706.03762

๐Ÿ“š Bibliography Management

  • Copy Citation / Copy BibTeX: From the hover, CodeLens, or command palette.
  • Export Bibliography: Generate a full bibliography for all papers referenced in the current file.
  • Show All Papers in File: List every reference in the active document.

๐Ÿ•˜ Version History

DevScholar tracks paper references across git commits in .paper-refs.json. Run "Show Paper Version History" to see when a reference was added or changed.

๐Ÿ”„ Two-Way Zotero Sync

Bidirectional sync between your code and Zotero library.

Setup:

  1. Get your Zotero API key from zotero.org/settings/keys
  2. Find your User ID on the same page (shown as "Your userID for API calls is XXXXXXX")
  3. Open VS Code Settings and search for "devscholar zotero"
  4. Enable Zotero integration and set your User ID
  5. Run "Set Zotero API Key" from the Command Palette

Features:

  • Export to Zotero: Run "Sync with Zotero" to push papers from your code to Zotero
  • Import from Zotero: Run "Import from Zotero" to select papers and insert citations
  • Collection Linking: Run "Link Zotero Collection" to associate a workspace with a Zotero collection
  • Duplicate Detection: Papers already in Zotero are skipped during export
  • Workspace Tagging: Exported papers are tagged with your workspace name (e.g., DevScholar:my-project)

๐Ÿ“– Two-Way Mendeley Sync

Bidirectional sync between your code and Mendeley library.

Setup:

  1. Register your app at dev.mendeley.com to get Client ID and Secret
  2. Open VS Code Settings and search for "devscholar mendeley"
  3. Enable Mendeley integration and enter your Client ID and Secret
  4. Run "Connect to Mendeley" from the Command Palette
  5. Sign in with your Elsevier/Mendeley account in the browser

Features:

  • Export to Mendeley: Run "Sync with Mendeley" to push papers from your code to Mendeley
  • Import from Mendeley: Run "Import from Mendeley" to select papers and insert citations
  • Folder Linking: Run "Link Mendeley Folder" to associate a workspace with a Mendeley folder
  • Duplicate Detection: Papers already in Mendeley are skipped during export
  • Auto Token Refresh: OAuth tokens are automatically refreshed when expired

Security: Zotero API keys and Mendeley OAuth tokens are stored in your system's keychain (macOS Keychain, Windows Credential Manager, or Linux Secret Service), not in plain-text settings files.

โš™๏ธ Configuration

SettingDefaultDescription
devscholar.autoParseOnSavetrueParse paper references when saving files
devscholar.showCodeLenstrueShow CodeLens actions above paper references
devscholar.showDecorationstrueUnderline paper references in the editor
devscholar.showStatusBartrueShow paper count in the status bar
devscholar.trackGitVersionstrueTrack references across git commits in .paper-refs.json
devscholar.cacheMaxAge7Max age of cached metadata, in days
devscholar.debounceMs500Delay before re-parsing on keystroke, in milliseconds
devscholar.zoteroEnabledfalseEnable Zotero integration
devscholar.zoteroUserId""Zotero user ID
devscholar.mendeleyEnabledfalseEnable Mendeley integration
devscholar.mendeleyClientId""Mendeley OAuth Client ID
devscholar.mendeleyClientSecret""Mendeley OAuth Client Secret

Collection and folder links are stored per workspace by the "Link Zotero Collection" and "Link Mendeley Folder" commands. Use "Clear Paper Cache" and "Show Cache Statistics" to manage the metadata cache.

๐Ÿ“ Changelog

See CHANGELOG.md for release history.

๐Ÿค Contributing

Check out examples/devscholar_showcase.py to see various link formats in action! Contributions are welcome on GitHub.


Enjoying DevScholar? Please leave a review! โญ