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
