Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a few more OpenRPC methods for rstudioapi shims #2593

Merged
merged 6 commits into from
Apr 3, 2024

Conversation

juliasilge
Copy link
Contributor

@juliasilge juliasilge commented Apr 1, 2024

Intent

Addresses #1312 with what I hope 🤞 are the last Public Beta rstudioapi shims

Goes along with posit-dev/ark#286

Approach

Chugging along with more rstudioapi shims, as before 🚂

QA Notes

To test this out, together with posit-dev/ark#286, try:

rstudioapi::sendToConsole("1 + 1")
rstudioapi::sendToConsole("1 + 1", focus = FALSE)
rstudioapi::sendToConsole("1 + ")
rstudioapi::sendToConsole("lm(mpg ~ ., data = mtcars)")

some_code <- c("library(tidyverse)", "arrange(mtcars, mpg)")
rstudioapi::sendToConsole(some_code, focus = FALSE)
rstudioapi::documentNew(some_code)
rstudioapi::documentNew("SELECT * FROM 1", type = "sql")

const uri = await this.documents.createDocumentData({
content: contents, language: languageId
});
const opts: TextEditorOpenOptions = { preview: true };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we address #2438, we can pass a Range (i.e. two Position objects) in here in the TextEditorOpenOptions.

Comment on lines +232 to +233
// TODO: Return a document ID
return null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For us to address with #2571

@juliasilge juliasilge marked this pull request as ready for review April 1, 2024 22:27
@juliasilge juliasilge requested a review from jmcphers April 1, 2024 22:30
Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@juliasilge
Copy link
Contributor Author

juliasilge commented Apr 1, 2024

TODO:

  • Bump ark version

@juliasilge juliasilge merged commit 4f9f147 into main Apr 3, 2024
23 checks passed
@juliasilge juliasilge deleted the last-rstudioapi-shims-i-hope branch April 3, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants