Skip to content

not getting ggplot2 column completions in Quarto visual mode #14399

Open

Description

@olivroy

System details

RStudio Edition : Desktop
RStudio Version : 2024.04.0+544 / 2024.04.0+497
OS Version      : Windows / macOS
R Version       : 4.3.2

Steps to reproduce the problem

  1. Create new Quarto document (tick Visual mode
    image

  2. Type the following code in the first chunk.

library(ggplot2)
ggplot(data = mtcars, aes(x = ))
  1. Try to request completion after x.

Describe the problem in detail

No ggplot2 column completions show up. The aesthetics completion work

Describe the behavior you expected

Specific ggplot2 column name completions, as it works in .R file and .qmd (source mode) #8444

image

Hopefully, this will be a quick fix!

The full file if useful.

---
title: "Untitled"
format: html
editor: visual
---

## Quarto

Quarto enables you to weave together content and executable code into a finished document.
To learn more about Quarto see <https://quarto.org>.

## Running Code

When you click the **Render** button a document will be generated that includes both content and the output of embedded code.
You can embed code like this:

```{r}
library(ggplot2)
ggplot(data = mtcars, aes(x = ))
```

Related to the fact that document context is required to get completions for ggplot2.

# get document contents
document <- .rs.getSourceDocument(documentId, TRUE)
contents <- strsplit(document$contents, "\n", fixed = TRUE)[[1L]]

  • 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 Mar 8, 2024
  2. changed the title [-]Issue with ggplot2 specific completions in Quarto visual mode[/-] [+]not getting ggplot2 specific completions in Quarto visual mode[/+] on Mar 8, 2024
  3. changed the title [-]not getting ggplot2 specific completions in Quarto visual mode[/-] [+]not getting ggplot2 column completions in Quarto visual mode[/+] on Mar 8, 2024
  4. added
    autocompletion
    and removed
    new
    on Mar 11, 2024
  5. added this to the Product Backlog milestone on Mar 11, 2024
  6. jthomasmock commented on Mar 11, 2024

    @jthomasmock
    Contributor

    Thanks @olivroy - we have a few different auto-complete and visual mode items we want to address, putting it into one of those epics to be looked at in future.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    autocompletionbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions