quarto-dev / quarto-dev/quarto

Citation preview shown for entire line (not just citation key)

Open
#730 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug vscode
Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

Bug description

When using citations from a .bib file, the VS Code extension displays a preview on hover. With word wrap enabled, hovering anywhere on a long wrapped line triggers the preview, even when far from the citation key. I find this rather distracting, so I suggest to show the preview only when hovering directly over the citation key. Note that this is not necessarily a bug, because it could be intentional, but if so please consider this issue a suggestion rather than a bug report.

Steps to reproduce

Open test.qmd in Visual Studio Code and enable word wrap (Option + Z on macOS). Then hover anywhere over the text and the citation preview will appear.

test.qmd

---
title: Test
format: html
bibliography: test.bib
---

Sed ut perspiciatis unde omnis [@key_article] iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

test.bib

@article{key_article,
  author       = {Author, First and Author, Second},
  title        = {Title of the Article},
  journaltitle = {Journal Title},
  year         = {2025},
  volume       = {10},
  number       = {2},
  pages        = {100--120},
  doi          = {10.xxxx/xxxxxx},
  url          = {https://www.example.com/article},
  urldate      = {2025-06-12},
}
Actual behavior

The citation preview appear when hovering anywhere over the text.

Expected behavior

The citation preview should only appear when hovering directly over the key.

Your environment
  • IDE: Visual Studio Code
  • OS: macOS 15.5
Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior in test.qmd with test.bib in Visual Studio Code: enable word wrap, then hover away from [@key_article]. Start by tracing the extension's citation hover handling. Done means the preview appears only when the pointer is directly over the citation key.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.