-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
Description
I'm wondering if you all would welcome a small PR to the vscode extension to improve rendering of cells in quarto documents. I know that you can use cells.background.light/cells.background.dark to change the color, but this requires me to change this every time I switch themes. Adding an option cells.background.useTheme bool that would use notebook.selectedCellBackground theme color. This is a built in color for VSCode's notebooks and most themes will have a customized color.
I think it would be a relatively easy change adding a branch here.
quarto/apps/vscode/src/providers/background.ts
Lines 216 to 234 in 491057b
| const light = config.get("cells.background.light", "#E1E1E166"); | |
| const dark = config.get("cells.background.dark", "#40404066"); | |
| this.enabled_ = config.get("cells.background.enabled", true); | |
| this.delayMs_ = config.get("cells.background.delay", 250); | |
| if (this.backgroundDecoration_) { | |
| this.backgroundDecoration_.dispose(); | |
| } | |
| this.backgroundDecoration_ = vscode.window.createTextEditorDecorationType({ | |
| isWholeLine: true, | |
| light: { | |
| backgroundColor: light, | |
| }, | |
| dark: { | |
| backgroundColor: dark, | |
| }, | |
| }); |
See a similar patch to positron-code-cells extension: posit-dev/positron#6633
juliasilge