autocomplete and indentation not working in Quarto chunks after using :::

I've just updated R and Rstudio, and now autocomplete and indentation options within chunks are not working in Quarto after I use :::panel-tabset::: That is, suggestions are now only available in the console, but not in the code chunks in the Quarto document. I cannot even use $ to extract variables from a dataset within a chunk in the quarto document . The autocompletion and appropriate indentation work as expected before using :::panel-tabset::: in the document; but after the first time that I used :::panel-tabset::: stop working. I did not have this issue two days ago before the update.

I've tried restarting, uninstalling packages, installing again, and creating new Quarto documents, and I've spent many hours looking in forums for a similar case, but I couldn't find anything that works. I'd appreciate your help. Thank you so much for your support. Below you can a picture of my autocompletion profile and an example of one example Quarto document.

Information:
R version 4.4.0 (2024-04-24)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.4.1

This is an example of Quarto document:


title: "Untitled"
format: html
editor: visual

library(tidyverse)
mtcars |> 
  select(mpg, cyl ) # here the indentation works and I could use autocomplete options

::: panel-tabset

subheading 1

mtcars |> 
select() # note that indentation is not working here anymore

subheading 2

mtcars |> 
filter() # there is also no autocompletion suggestions

:::

other chunk

mtcars |> 
select() # the issue persist even after I closed the :::panel-tabset:::

Hi Efrain,

Does it make a difference if you use this, instead?

::: {.panel-tabset}

Thanks for replying. No, it doesn't make any difference. I realized that this happens after I use the triple colon :::, no matter what other function I use. For instance, the same thing happens if I use ::: footer :::, ::: columns :::, etc. I have no clue about why is this happening, although it's likely to be a very simple thing. Any idea? Everything works fine for autocompletion and suggestion, finding function arguments, etc, before the first :::. Thanks!

I think I was able to use the code you supplied, but without any problems, so I want to make sure I copied it correctly. Here my version, which I made by enclosing everything you wrote within a pair of quadruple backticks (````), and adding the {r} code that was missing from the chunks:

---
title: "Untitled"
format: html
editor: visual
---
```{r}
library(tidyverse)
```

```{r}
mtcars |> 
  select(mpg, cyl ) # here the indentation works and I could use autocomplete options
```

::: panel-tabset

## subheading 1

```{r}
mtcars |> 
select() # note that indentation is not working here anymore
```

## subheading 2

```{r}
mtcars |> 
filter() # there is also no autocompletion suggestions
```

:::

# other chunk

```{r}
mtcars |> 
select() # the issue persist even after I closed the :::panel-tabset:::
```

Is this what your .qmd source looks like?

Exactly, that's correct. If you are not reproducing my error, should it be something in my computer /R/Rstudio configuration? If so, what do you think it could be? I really appreciate your help. I've tried uninstalling and installing R and Rstudio, and update packages, including development version of Quarto, but no idea what it could be. Thanks. Below my R.version and Quarto version.

platform aarch64-apple-darwin20
arch aarch64
os darwin20
system aarch64, darwin20
status
major 4
minor 4.0
year 2024
month 04
day 24
svn rev 86474
language R
version.string R version 4.4.0 (2024-04-24)
nickname Puppy Cup

Quarto Version
[1] ‘1.4.553’

Sorry, I'm afraid I'm stumped, too. The only other information that occurs to me might be helpful is a screenshot of your full editor pane that shows the full .qmd source file. Otherwise, I'm hoping someone else might be able to help spot where the issue might be.

this seems related to issue: Reindent & Reformat Lines stopped working in Quarto Callout Blocks · Issue #14640 · rstudio/rstudio · GitHub

Thanks, @dromano, I appreciate your taking the time to help me. @Leen_Sonneveld, Indeed, same issue. Thanks for pointing that out.

Hey,
Just wanted to say I suddently have the same problem after upgrading to Rstudio 2024 (I was on 2023.11 I think).
I can reproduce egarcias's issue using their code above. Note that it isnt limited to panel tabsets, I have the same problem after the following callout:


title: "title"

iris %>%
  filter(Species == "abc")

:::{.callout-tip}

indentation stops working after this

:::

iris %>%
filter(Species == "abc")

I have been having the same problem since today when I updated my R (R version 4.4.0 (2024-04-24)) and RStudio (released: 2024-05-11). Also running under macOS Sonoma 14.4.1, I don't know if it's a mac specific problem.

The lack of autocompletion suggestions for arguments is the worst part so I have been searching and trying to fix it but with no success.

This github thread shared by @Leen_Sonneveld suggests a fix is in the works.

I couldn't find the suggested fix, or perhaps I didn't understand it. @dromano, can you direct me toward the fix you mentioned? thanks

Sorry, @egarcias, I should have been clearer: Folks are currently working on a fix, but I don't think there is one yet.

1 Like