vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Can rstudioapi::getThemeInfo() be supported?

Open MilesMcBain opened this issue 5 years ago • 2 comments

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.

MilesMcBain avatar Feb 06 '21 00:02 MilesMcBain

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

github-actions[bot] avatar May 23 '22 02:05 github-actions[bot]

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: https://github.com/Microsoft/vscode/issues/32813 The activeColorTheme works though.

ElianHugh avatar May 26 '22 02:05 ElianHugh

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

github-actions[bot] avatar May 30 '23 01:05 github-actions[bot]

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

github-actions[bot] avatar Jun 13 '23 01:06 github-actions[bot]