slidevjs / slidev-vscode

VS Code extension for Slidev
https://marketplace.visualstudio.com/items?itemName=antfu.slidev
MIT License
252 stars 17 forks source link

Page breaks (---) barely visible in VSCode, e.g. with Dracula, but also any other theme #22

Closed JPustkuchen closed 3 months ago

JPustkuchen commented 1 year ago

Hi and thank you very much for this wonderful VSCode extension and the great Slidev in general!

One problem I'm running into with VSCode and Slidev again and again is that the page breaks (---) are barely visible in the IDE using any common VSCode theme.

I already tried overriding the setting in VSCode settings.json, but it simply doesn't work. Doesn't have any effect:

"editor.tokenColorCustomizations": {
    "[Dracula]": {
      "textMateRules": [
        {
          "scope": "meta.separator.markdown",
          "settings": {
            "foreground": "#aaff00",
          }
        },
        {
            "scope": "text.html.markdown",
            "settings": {
              "foreground": "#FFFFFF",
            }
          }
      ]
    }
  },

This is what it currently looks like (note the #2 and #3) are the breaks: grafik

Would it be possible through this intention (or for now add it to the Slidev docs) to make these breaks more visible by default?

I hope, I'm not the only one struggling with this, using Slidev for the first time...

antfu commented 1 year ago

The color is hard coded. I am not sure if it's possible for an extension to read and reuse the token color for the current theme. If you figure out a way, PR welcome :)

JPustkuchen commented 1 year ago

Thanks @antfu!

The point why I created it here is also to see, if other users run into the same issue with all the typical VSCode Themes. For "regular" Markdown files, the ---separator is not that important and it's fine to have it barely visible. But for the Slidev slides it's super important of course. So I was hoping the dedicated extension could solve this. 😢

If I'm the only one with this problem or someone can provide a workaround for that, please let me know!