You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m experiencing issues with code indentation in Quarto R chunks while editing in VS Code, but everything works fine in plain R files. Specifically, when using operators like the pipe (%>%) or + (in ggplot2), the code does not indent correctly after I type them. However, the formatting is applied when I save the document, which interrupts the editing flow.
In plain R files, the indentation works as expected immediately after inserting these operators, but this behavior is inconsistent in Quarto documents.
Environment
OS: macOS 15.0.1
Quarto Version: 1.6.37
VS Code Version: 1.95.3
Steps to Reproduce
Open the following Quarto file in VS Code:
---title: "R Code Indentation"date: 2024-11-24---```{r}#| label: ggplotlibrary(dplyr)library(ggplot2)ggplot(diamonds, aes(x = carat, y = price)) +geom_point() # Indentation issue with `+```````{r}#| label: pipediamonds %>%select(1:3) # Indentation issue with `%>%````
I’m experiencing issues with code indentation in Quarto R chunks while editing in VS Code, but everything works fine in plain R files. Specifically, when using operators like the pipe (
%>%
) or+
(inggplot2
), the code does not indent correctly after I type them. However, the formatting is applied when I save the document, which interrupts the editing flow.In plain R files, the indentation works as expected immediately after inserting these operators, but this behavior is inconsistent in Quarto documents.
Environment
Steps to Reproduce
Open the following Quarto file in VS Code:
VS Code Settings
My
settings.json
in VS Code looks like below:What I Have Tried:
editor.formatOnSave
andeditor.formatOnType
in my VS Code settings.languageserver
) is running.[quarto]
and[r]
in mysettings.json
file.Despite these efforts, indentation for the Quarto R chunks does not work as intended while editing. It only takes effect on save.
Expected Behavior:
Any Suggestions?
The text was updated successfully, but these errors were encountered: