VSCode Extension: Preview opens wrong file when started from subdirectory in Cursor IDE
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript, vscode
- Domain
- tooling
Research direction
Reproduce the issue with the linked fub-letter example repository by opening english/template.qmd in Cursor and triggering Quarto preview. Locate the VS Code extension entry point for the preview command and inspect how the active file and workspace directory are selected; done means the opened subdirectory file is previewed instead of the root file.
Written by the indexing model from the issue text.
Description
Bug Description
When opening a .qmd file in a subdirectory and triggering Quarto preview in Cursor IDE, the preview renders a different file from the project root instead of the opened file.
Steps to Reproduce
- Have a Quarto project with subdirectories containing
.qmdfiles:project/ ├── template.qmd ├── english/ │ └── template.qmd └── german/ └── template.qmd - Open
english/template.qmdin Cursor IDE - Trigger Quarto preview (Cmd+Shift+K or preview button)
- Observe that
project/template.qmdis previewed instead ofenglish/template.qmd
Expected Behavior
Preview should render the currently opened file (english/template.qmd)
Actual Behavior
Preview renders the root template.qmd file instead, ignoring which file is actually open in the editor
Environment
- Cursor IDE version: 2.3.41 (fork of VS Code)
- Quarto extension version: 1.128.0
- Quarto CLI version: 1.8.26
- OS: macOS 26.2 (Sequoia)
Workaround
Running quarto preview template.qmd from command line in the subdirectory works correctly, so this appears to be an IDE extension issue rather than a Quarto CLI bug.
Additional Context
- The issue occurs consistently regardless of which subdirectory file is opened
- The preview always defaults to the root
template.qmdfile - This makes it impossible to preview subdirectory-specific templates from within Cursor IDE
- Cursor IDE is based on VS Code, so this may affect VS Code as well
Related Issues
- Possibly related to working directory resolution in the VS Code extension
- Similar behavior seen in quarto-dev/quarto-cli#7049 (Quarto processes several files when previewing one)
Example Repository
Can be reproduced with: https://github.com/michaelaye/fub-letter
- Dominant language
- TypeScript
- Stars
- 645
- Forks
- 62
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 13
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
quarto-dev/quarto#1099 ·
-
vscode
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
quarto-dev/quarto#934 · 1 comment · 2 reactions ·
-
vscode
Difficulty 5/5 Over a week Newbie friendliness 42/100
quarto-dev/quarto#1130 ·
-
vscode
Difficulty 3/5 1-2 days Newbie friendliness 68/100
quarto-dev/quarto#1122 ·
-
bug vscode zotero
Difficulty 4/5 3-5 days Newbie friendliness 48/100
quarto-dev/quarto#1119 · 1 comment ·
All issues in quarto-dev/quarto
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
vercel/vercel-plugin#199 ·