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

Can rstudioapi::getThemeInfo() be supported? #547

Closed
MilesMcBain opened this issue Feb 6, 2021 · 4 comments
Closed

Can rstudioapi::getThemeInfo() be supported? #547

MilesMcBain opened this issue Feb 6, 2021 · 4 comments

Comments

@MilesMcBain
Copy link
Collaborator

getThemeInfo() not currently supported. It is used by {thematic} to do automatic theming of ggplots:
https://twitter.com/grrrck/status/1357709982351974400?s=20

Describe the solution you'd like
An implementation that works with {thematic}.

Describe alternatives you've considered
It might be possible to shim thematic itself if the theme info is too RStudio dependent.

@github-actions
Copy link

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the stale label May 23, 2022
@ElianHugh
Copy link
Collaborator

ElianHugh commented May 26, 2022

Hi @MilesMcBain , did you end up looking at this? I'd be happy to give this a look :)

Edit:

It looks like getThemeInfo is expected to return a list like so:

list(
      editor = theme$name,
      global = global,
      dark = theme$isDark,
      foreground = foreground,
      background = background
   )

We can also access VSCode themeing via commands such as new vscode.ThemeColor('editor.background') and I think 1vscode.window.activeColorTheme` for dark/light info

Edit2:

OK, looks like ThemeColor doesn't pass a reference to the colour itself, just a pointer :(
See: microsoft/vscode#32813
The activeColorTheme works though.

@github-actions
Copy link

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the stale label May 30, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

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

No branches or pull requests

2 participants