Cursor Quarto Preview Button Ignores Python Configuration

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The Quarto preview button in Cursor (but not VS Code) ignores both project-level (_quarto.yml) and workspace-level (.vscode/settings.json) Python configuration, instead using an auto-detected uv environment that lacks the required Jupyter kernel.

This works correctly in VS Code - both the terminal command and preview button work. The issue is specific to Cursor.

Steps to Reproduce

  1. Create a project with a pyproject.toml (triggers Cursor to auto-create a uv environment)
  2. Set up a conda environment with a registered Jupyter kernel at ~/Library/Jupyter/kernels/my-kernel-name/
  3. Create a _quarto.yml with explicit Python path:
    jupyter:
      python: /path/to/conda/env/bin/python
    
  4. Create a .vscode/settings.json with:
    {
      "python.defaultInterpreterPath": "/path/to/conda/env/bin/python",
      "python.terminal.activateEnvironment": false,
      "quarto.render.env": {
        "QUARTO_PYTHON": "/path/to/conda/env/bin/python"
      }
    }
    
  5. Create a .qmd file with jupyter: my-kernel-name in the YAML header
  6. Click the Quarto preview button in Cursor

Expected Behavior

The preview should respect the Python configuration from _quarto.yml and .vscode/settings.json, using the specified Python interpreter which can access the required Jupyter kernel.

This is exactly what happens in VS Code - the preview button works correctly there.

Operating System

MacOS

Version Information

Version: 2.4.27
VSCode Version: 1.105.1
Commit: 4f2b772756b8f609e1354b3063de282ccbe7a690
Date: 2026-01-31T21:24:58.143Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0

Additional Information

Workarounds

  1. Running manually in Cursor terminal works:

    quarto preview path/to/file.qmd --no-browser --no-watch-inputs
    

    This respects the _quarto.yml configuration.

  2. Using VS Code instead of Cursor - the preview button works correctly in VS Code with the same configuration files.

Root Cause Analysis

Cursor’s Python extension auto-detects pyproject.toml and creates an ephemeral uv environment. Cursor’s Quarto integration appears to use this auto-detected Python environment instead of respecting:

  1. The jupyter.python setting in _quarto.yml
  2. The python.defaultInterpreterPath in .vscode/settings.json
  3. The QUARTO_PYTHON environment variable set via quarto.render.env

This is a Cursor-specific issue - VS Code with the exact same configuration files and Quarto extension correctly respects the Python path configuration. The terminal-based quarto preview command also works correctly in Cursor.

Impact

This makes the Cursor preview button unusable for projects that:

  • Use conda/mamba environments with custom Jupyter kernels
  • Have a pyproject.toml for tooling (ruff, pytest, etc.)
  • Cannot or should not use uv for environment management

Users must either:

  • Use VS Code instead of Cursor for Quarto work
  • Run quarto preview manually in the terminal (losing the convenience of the preview button)

Suggested Fix

Cursor’s Quarto integration should match VS Code’s behavior and respect the Python path configuration in this priority order:

  1. jupyter.python in _quarto.yml (project-level configuration)
  2. QUARTO_PYTHON environment variable (if set via quarto.render.env)
  3. python.defaultInterpreterPath from .vscode/settings.json (workspace-level)
  4. Auto-detected Python (current behavior, only as fallback)

This would:

  • Align Cursor’s preview button behavior with VS Code
  • Match the terminal-based CLI behavior
  • Give users control over which Python interpreter to use

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. The comparison with VS Code is really helpful.

It looks like a bug in how extensions inherit Python environment settings in Cursor. Auto-detection, especially with uv or pyproject.toml, seems to override explicit paths in _quarto.yml and .vscode/settings.json.

I’m passing this to the team. No ETA yet, but your report helps us prioritize it, especially with the clear VS Code comparison.

For now, the most reliable workaround is to run it from the terminal:

quarto preview path/to/file.qmd --no-browser --no-watch-inputs

Let me know if you find anything else that helps narrow down the issue.

1 Like