quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
280 stars 19 forks source link

Editor selection is not within a code cell that supports formatting. #400

Closed alptemiz closed 3 months ago

alptemiz commented 3 months ago

I get this error when I try to format a cell in a qmd file.

Editor selection is not within a code cell that supports formatting. Source: Quarto

I am working on VSCode with R.

Quarto settings are like:

{
    "editor.inlineSuggest.enabled": true,
    "github.copilot.enable": {
        "quarto": true,
        "*": true
    },
    "editor.wordWrap": "on",
    "git.autofetch": true,
    "editor.formatOnType": true,
    "r.session.levelOfObjectDetail": "Detailed",
    "[html]": {
    },
    "[quarto]": {
        "editor.defaultFormatter": "quarto.quarto"
    },
    "files.associations": {
        "*.rmd": "markdown",
        "*.qmd": "quarto"
    },
    "security.workspace.trust.untrustedFiles": "open",
    "r.plot.useHttpgd": true,
    "r.bracketedPaste": true,
    "r.rpath.windows": "%USERPROFILE%\\AppData\\Local\\Programs\\R\\R-4.3.3\\bin\\x64\\R.exe",
    "r.rterm.windows": "%USERPROFILE%\\AppData\\Local\\miniconda3\\Scripts\\radian.exe",
    "git.openRepositoryInParentFolders": "always",

    }
alptemiz commented 3 months ago

Solved!

that was already installed but after reinstalling its package, it solved.

install.packages("quarto")