user13157078
user13157078

Reputation: 55

Change mermaid theme preview on VSCode

I use Mermaid to make diagrams in basic markdown documents and I want to change the default theme to the neutral theme. I use VSCode and Markdown enhanced preview extension. I tried to change the mermaid_config.js file by adding "theme": "neutral". It does not work!

// config mermaid init call
// http://knsv.github.io/mermaid/#configuration
//
// You can edit the 'MERMAID_CONFIG' variable below.
MERMAID_CONFIG = {
  startOnLoad: false,
  "theme": "neutral"
}

Upvotes: 5

Views: 1715

Answers (1)

Saikat
Saikat

Reputation: 16900

This can be changed from VSCode user settings. As per the docs:

markdown-mermaid.lightModeTheme — Configures the Mermaid theme used when VS Code is using a light color theme. Supported values are: "base", "forest", "dark", "default", "neutral". Currently not supported in notebooks.

markdown-mermaid.darkModeTheme — Configures the Mermaid theme used when VS Code is using a dark color theme. Supported values are: "base", "forest", "dark", "default", "neutral". Currently not supported in notebooks.

Upvotes: 0

Related Questions