Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run entire cell in .qmd file #584

Open
nasjr08 opened this issue Oct 24, 2024 · 0 comments
Open

Cannot run entire cell in .qmd file #584

nasjr08 opened this issue Oct 24, 2024 · 0 comments

Comments

@nasjr08
Copy link

nasjr08 commented Oct 24, 2024

This issue has arised in cursor and come about suddenly, when it was working when I first installed the quarto extension.

When I try to run an entire cell in this .qmd file:

a = 1
b = 2
c = a + b
print(c)

I am unable to run the whole code chunk in any way. I tried keyboard shortcut (cmd + shift+ enter) and to press the run cell button. In both cases, the line my cursor is currently on runs and the cursor moves to the next line. if the cursor is outside of a code chunk, the output is "Error: attempt to use zero-length variable name" and, again, the cursor moves to the next line. In the example above, I can't assign values to a and b simultaneously, or generate then print c at the same time.

Why is this happening? The keyboard shortcuts are all standard; quarto.runCurrentCell is cmd + shift + enter. My settings in cursor are as follows:

{
    "workbench.startupEditor": "none",
    "diffEditor.ignoreTrimWhitespace": false,
    "redhat.telemetry.enabled": false,
    "editor.unicodeHighlight.ambiguousCharacters": false,
    "remote.autoForwardPortsSource": "hybrid",
    "files.associations": {
        "*.rmd": "rmarkdown",
        "*.qmd": "quarto",
        "*.Rmd": "rmarkdown"
    },
    "workbench.settings.applyToAllProfiles": [
        "r.linting.enable"
    ],
    "workbench.colorTheme": "Default Dark Modern",
    "extensions.ignoreRecommendations": false,
    "[r]": {
        "editor.defaultFormatter": "REditorSupport.r",
        "editor.formatOnSave": true
    },
    "editor.largeFileOptimizations": true,
    "r.plot.useHttpgd": true,
    "r.plot.width": 800,
    "r.plot.height": 600,
    "r.lsp.enabled": true,
    "r.rterm.mac": "/usr/local/bin/R",
    "[rmd]": {
        "editor.wordWrap": "on",
        "editor.formatOnSave": false,
        "editor.defaultFormatter": "REditorSupport.r"
    },
    "r.linting.enable": true,
    "r.linting.lintr.linters": "linters_with_defaults(line_length_linter(120))",
    "git.enableSmartCommit": true,
    "git.autofetch": true,
    "git.confirmSync": false,
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 1000,
    "terminal.integrated.defaultProfile.osx": "zsh",
    "editor.folding": true,
    "editor.foldingStrategy": "auto",
    "workbench.editor.enablePreview": false
}

It has made working with quarto really frustrating in cursor (and by extension, VScode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant