-
Notifications
You must be signed in to change notification settings - Fork 49
Open
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 processes several files when previewing one quarto-cli#7049 (Quarto processes several files when previewing one)
Example Repository
Can be reproduced with: https://github.com/michaelaye/fub-letter
Metadata
Metadata
Assignees
Labels
No labels