Skip to content

When using the colon notation in Quarto, such as when using tab sets, the completion and indentation of R chunks stop functioning properly. #14739

Closed

Description

@ujtwr

System details

RStudio Edition : Server
RStudio Version : 2024.04.1+748
OS Version        :  Ubuntu (server) + Win11 Chorome (client)
R Version          :  4.4.0
Quarto             : 1.4.551

Steps to reproduce the problem

  1. Create new Quarto file (.qmd)
  2. Insert something elements using the colon notation like bellow:
::: {.panel-tabset}

:::
  1. Insert new R chunk after this
  2. In this new chunk, tab completion and indentation when pressing Enter do not work correctly. Also, re-indentation using Ctrl+i does not function.

Describe the problem in detail

The correct indentation is as follows:

```{r}
iris %>% 
  as_tibble() %>% 
  filter(
    Species == "setosa"
  ) %>% 
  count()
```

Because the indentation is not set correctly, it looks like this. Additionally, tab completion for variables does not work.

Also, when executing the code with Ctrl+Enter while the cursor is in the middle of the code, depending on the cursor's position, the code connected by pipes may not be recognized, resulting in an error.

```{r}
iris %>% 
as_tibble() %>% 
filter(
Species == "setosa"
) %>% 
count()

```

image

Describe the behavior you expected

Completion and indentation will function correctly.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on May 23, 2024
  2. added and removed
    new
    on May 23, 2024
  3. added this to the Cranberry Hibiscus milestone on May 23, 2024
  4. gtritchie commented on May 23, 2024

    @gtritchie
    Member
  5. gtritchie commented on Jun 27, 2024

    @gtritchie
    Member

    This was already fixed in 2024.04.2 (Chocolate Cosmos patch). Presumably fixed by #14744.

    We should do a quick double-check of this against Cranberry Hibiscus.

  6. ronblum commented on Jul 9, 2024

    @ronblum
    Contributor

    Verified in RStudio Desktop 2024.07.0-daily+303 and 2024.04.2+764 on Windows 11. Checked both the reindentation and completions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions