English | 简体中文 | 日本語 | Español | Português | 한국어 | 繁體中文
PlantUML Markdown Preview3 modes to fit your workflow. Render PlantUML, Mermaid & D2 inline — fast, secure, or zero-setup.
Choose Your Mode
Switch between modes anytime with a single setting — no migration, no restart.
Highlights
Table of Contents
FeaturesInline Diagram Preview
Math SupportRender mathematical expressions using KaTeX.
Diagram ScaleControl the display size of PlantUML, Mermaid, and D2 diagrams independently.
Rendering ModesChoose a preset mode that controls how PlantUML diagrams are rendered:
If Java is not found when opening a preview, a notification offers to switch to Easy mode. Status BarThe status bar shows the current rendering mode (Fast / Secure / Easy) and, in Fast mode, the local server state (running, starting, error, stopped).
HTML ExportExport your Markdown document to a self-contained HTML file.
PDF ExportExport your Markdown document to PDF using a headless Chromium-based browser.
Bulk Diagram ExportExport all diagrams from a Markdown file as individual PNG or SVG files.
Navigation
Diagram ViewerRight-click any PlantUML, Mermaid, or D2 diagram in the preview and select Open in Diagram Viewer to open it in a separate pan & zoom panel.
PlantUML
|
| Theme | Style |
|---|---|
| GitHub Light | White background (default) |
| Atom Light | Soft gray text, Atom editor inspired |
| One Light | Off-white, balanced palette |
| Solarized Light | Warm beige, eye-friendly |
| Vue | Green accents, Vue.js docs inspired |
| Pen Paper Coffee | Warm paper, handwritten aesthetic |
| Coy | Near-white, clean design |
| VS | Classic Visual Studio colors |
Dark themes:
| Theme | Style |
|---|---|
| GitHub Dark | Dark background |
| Atom Dark | Tomorrow Night palette |
| One Dark | Atom-inspired dark |
| Dracula | Vibrant dark |
| Solarized Dark | Deep teal, eye-friendly |
| Monokai | Vivid syntax, Sublime Text inspired |
Switch preview themes instantly from the title bar icon — no re-render needed (CSS-only swap). PlantUML theme changes trigger a re-render.
PlantUML themes control diagram styling independently. The extension discovers available themes from your PlantUML installation and presents them in a combined QuickPick alongside preview themes.
Mermaid themes control Mermaid diagram styling: default, dark, forest, neutral, base. Also available in the QuickPick theme picker.
D2 themes — 19 built-in themes (e.g. Neutral Default, Dark Mauve, Terminal). Configurable via the settings or QuickPick theme picker.
Syntax Highlighting
190+ languages supported via highlight.js. Code blocks are styled to match your selected preview theme.
Security
- Content Security Policy with nonce-based script restrictions
- No code execution from Markdown content
- User-authored
<script>tags are blocked - Local image loading follows the mode preset by default (
allowLocalImages: "mode-default"); Secure mode disables it for maximum security - HTTP image loading is off by default (
allowHttpImages); enabling addshttp:to the CSPimg-srcdirective, which allows unencrypted image requests — use only on trusted networks (intranet, local dev servers)
Built-in Markdown Preview Integration
PlantUML, Mermaid, and D2 diagrams also render in VS Code's built-in Markdown preview
(Markdown: Open Preview to the Side). No additional configuration needed.
Note: The built-in preview does not support this extension's preview themes, bidirectional scroll sync, or HTML export. For the full feature set, use the extension's own preview panel (
Cmd+Alt+V/Ctrl+Alt+V).Note: The built-in preview renders diagrams synchronously. Large or complex PlantUML diagrams may briefly freeze the editor. For heavy diagrams, use the extension's own preview panel instead.
Quick Start
Prerequisites
Mermaid — no prerequisites. Works out of the box.
D2 — no prerequisites. Rendered using built-in D2 Wasm — works out of the box.
PlantUML (Easy mode) — no prerequisites. Diagram source is sent to a PlantUML server for rendering.
PlantUML (Fast / Secure mode) — default:
| Tool | Purpose | Verify |
|---|---|---|
| Java 11+ (JRE or JDK) | Runs PlantUML (bundled PlantUML 1.2026.2 requires Java 11+) | java -version |
| Graphviz | Optional — needed for class, component, and other layout-dependent diagrams (see Diagram Support) | dot -V |
Note: A PlantUML jar (LGPL, v1.2026.2) is bundled with the extension. No separate download is needed. Java 11 or later is required.
Tip: If Java is not installed, the extension will offer to switch to Easy mode when you open a preview.
Diagram Support
What works depends on your setup:
| Diagram | LGPL (bundled) | Win: GPLv2 jar | Mac/Linux: + Graphviz |
|---|---|---|---|
| Sequence | ✓ | ✓ | ✓ |
| Activity (new syntax) | ✓ | ✓ | ✓ |
| Mind Map | ✓ | ✓ | ✓ |
| WBS | ✓ | ✓ | ✓ |
| Gantt | ✓ | ✓ | ✓ |
| JSON / YAML | ✓ | ✓ | ✓ |
| Salt / Wireframe | ✓ | ✓ | ✓ |
| Timing | ✓ | ✓ | ✓ |
| Network (nwdiag) | ✓ | ✓ | ✓ |
| Class | — | ✓ | ✓ |
| Use Case | — | ✓ | ✓ |
| Object | — | ✓ | ✓ |
| Component | — | ✓ | ✓ |
| Deployment | — | ✓ | ✓ |
| State | — | ✓ | ✓ |
| ER (Entity Relationship) | — | ✓ | ✓ |
| Activity (legacy) | — | ✓ | ✓ |
- LGPL (bundled) — works out of the box. No Graphviz needed.
- Win: GPLv2 jar — the GPLv2 version bundles Graphviz (Windows only, auto-extracted). Set
plantumlJarPathto use it. - Mac/Linux: + Graphviz — install Graphviz separately. Works with either LGPL or GPLv2 jar.
Install
- Open VS Code
- Search for PlantUML Markdown Preview in the Extensions view (
Ctrl+Shift+X/Cmd+Shift+X) - Click Install
Setup
Fast mode (default): Starts a persistent local PlantUML server for instant re-renders. Requires Java 11+.
To use Secure mode: Set mode to "secure". Uses Java 11+ per render without a background server or network access.
To use Easy mode (no setup required): Set mode to "easy". Diagram source is sent to a PlantUML server for rendering. The extension will also prompt you to switch when Java is not detected.
Fast and Secure modes: The bundled LGPL jar supports sequence, activity, mind map, and other diagrams without extra setup (see Diagram Support). To enable class, component, use case, and other layout-dependent diagrams, follow the steps for your platform below.
Windows
- Install Java if not already installed (open PowerShell and run):
winget install Microsoft.OpenJDK.21 - If
javais not on your PATH, find the full path in PowerShell:
Open VS Code settings (Get-Command java # e.g. C:\Program Files\Microsoft\jdk-21.0.6.7-hotspot\bin\java.exeCtrl+,), search forplantumlMarkdownPreview.javaPath, and enter the path shown above - Download the GPLv2 version of PlantUML (
plantuml-gplv2-*.jar) to a folder of your choice (includes Graphviz — no separate install needed) - Open VS Code settings (
Ctrl+,), search forplantumlMarkdownPreview.plantumlJarPath, and enter the full path to the downloaded.jarfile (e.g.C:\tools\plantuml-gplv2-1.2026.2.jar)
Mac
- Install Java and Graphviz via Homebrew:
brew install openjdk graphviz - If
dotis not on your PATH, find the full path and set it in VS Code:
Open VS Code settings (which dot # e.g. /opt/homebrew/bin/dotCmd+,), search forplantumlMarkdownPreview.dotPath, and enter the path shown above
Linux
- Install Java and Graphviz:
# Debian / Ubuntu sudo apt install default-jdk graphviz # Fedora sudo dnf install java-21-openjdk graphviz - If
dotis not on your PATH, find the full path and set it in VS Code:
Open VS Code settings (which dot # e.g. /usr/bin/dotCtrl+,), search forplantumlMarkdownPreview.dotPath, and enter the path shown above
Note:
javaPathdefaults to"java". If left at the default, the Java binary underJAVA_HOME/bin/(orJAVA_HOME\bin\on Windows) is tried first, thenjavaon PATH.dotPathandplantumlJarPathdefault to"dot"and the bundled jar respectively. Only configure them if these commands are not on your PATH or you want to use a different jar.
Usage
Open Preview
- Keyboard shortcut:
Cmd+Alt+V(Mac) /Ctrl+Alt+V(Windows / Linux) - Context menu: Right-click a
.mdfile in the Explorer or inside the editor → PlantUML Markdown Preview → Open Preview to Side - Command Palette:
PlantUML Markdown Preview: Open Preview to Side
The preview uses its own theming independent of VS Code — default is a white background (GitHub Light).
Open Diagram Preview
Open .puml / .plantuml, .mmd / .mermaid, or .d2 files directly in a pan & zoom preview — no Markdown wrapper needed.
- Keyboard shortcut:
Cmd+Alt+V(Mac) /Ctrl+Alt+V(Windows / Linux) — same shortcut, auto-selects based on file type - Context menu: Right-click a
.puml/.plantuml,.mmd/.mermaid, or.d2file in the Explorer or editor → Preview PlantUML File / Preview Mermaid File / Preview D2 File - Command Palette:
PlantUML Markdown Preview: Preview PlantUML File,Preview Mermaid File, orPreview D2 File
Export to HTML
- Context menu: Right-click a
.mdfile → PlantUML Markdown Preview → Export as HTML → choose a width option - Preview panel: Right-click inside the preview panel → Export as HTML or Export as HTML & Open
The submenu offers these width options:
| Option | Description |
|---|---|
| Current Settings | Export with the current configuration (no responsive CSS) |
| Responsive | User-configured scale; diagrams that overflow are shrunk to fit |
| 640px – 1440px | Fixed body width in pixels |
| Responsive (Left-Aligned) | Same as Responsive but left-aligned |
| 640px – 1440px (Left-Aligned) | Fixed width, left-aligned |
The HTML file is saved alongside the source .md file.
Export to PDF
- Context menu: Right-click a
.mdfile → PlantUML Markdown Preview → Export as PDF → Portrait or Landscape - Preview panel: Right-click inside the preview panel → Export as PDF or Export as PDF & Open → Portrait or Landscape
The PDF file is saved alongside the source .md file. Chrome, Edge, or Chromium is required.
The pdfScale setting (default 0.625) controls the overall scale of text and diagrams.
Save / Copy Diagram as PNG / SVG
- Preview panel: Right-click a diagram → Copy Diagram as PNG, Save Diagram as PNG, or Save Diagram as SVG
- Diagram Viewer: Right-click inside the viewer → Copy Diagram as PNG, Save Diagram as PNG, or Save Diagram as SVG
- Standalone diagram preview: Right-click inside the preview → Copy Diagram as PNG, Save Diagram as PNG, or Save Diagram as SVG
Export All Diagrams
- Context menu: Right-click a
.mdfile → PlantUML Markdown Preview → Export All Diagrams as PNG or Export All Diagrams as SVG - Preview panel: Right-click inside the preview panel → Export All Diagrams as PNG or Export All Diagrams as SVG
- Command Palette:
PlantUML Markdown Preview: Export All Diagrams as PNG/Export All Diagrams as SVG
A save dialog lets you choose the output directory name (default: {filename}_diagrams). Each diagram is saved as diagram-1.png, diagram-2.png, etc. in document order. The preview must be open.
Navigation
- Go to top / Go to bottom: Buttons in the top-right corner of the preview panel
- Reload: Click the ↻ button to manually refresh the preview and clear caches (included files are also refreshed automatically on save)
- Table of Contents: Click the TOC button in the top-right corner of the preview panel to open a sidebar listing all headings; click a heading to jump to it
Change Theme
Click the theme icon in the preview panel title bar, or use the Command Palette:
- Command Palette:
PlantUML Markdown Preview: Change Preview Theme
The theme picker shows all four theme categories in a single list — preview themes, PlantUML themes, Mermaid themes, and D2 themes — so you can switch any of them from one place.
PlantUML Syntax
```plantuml
Alice -> Bob: Hello
Bob --> Alice: Hi!
```
@startuml / @enduml wrappers are added automatically if omitted.
Mermaid Syntax
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[OK]
B -->|No| D[Cancel]
```
D2 Syntax
```d2
server -> db: query
db -> server: result
```
See D2 documentation for syntax details.
Math Syntax
Inline math uses single dollar signs, block math uses double:
Einstein's famous equation $E=mc^2$ shows mass-energy equivalence.
$$\int_0^\infty e^{-x}\,dx = 1$$
Disable with
enableMath: falseif$symbols cause unwanted math parsing (e.g.$100).
Snippets
Type a snippet prefix and press Tab to expand. Two sets of snippets are available:
- Markdown snippets (outside fenced blocks) — prefixed with
plantuml-,mermaid-, ord2-, expands a complete fenced block - Template snippets (inside fenced blocks) — prefixed with
tmpl-, expands diagram body only. Typetmplto see all available templates
Markdown Snippets (outside fenced blocks)
Expand a complete ```plantuml ... ``` block including fences:
| Prefix | Diagram |
|---|---|
plantuml |
Empty PlantUML block |
plantuml-sequence |
Sequence diagram |
plantuml-class |
Class diagram |
plantuml-activity |
Activity diagram |
plantuml-usecase |
Use case diagram |
plantuml-component |
Component diagram |
plantuml-state |
State diagram |
plantuml-er |
ER diagram |
plantuml-object |
Object diagram |
plantuml-deployment |
Deployment diagram |
plantuml-mindmap |
Mindmap |
plantuml-gantt |
Gantt chart |
PlantUML Snippets (inside fenced blocks)
Diagram templates (type tmpl to see all):
| Prefix | Content |
|---|---|
tmpl-seq |
Sequence diagram |
tmpl-cls |
Class definition |
tmpl-act |
Activity diagram |
tmpl-uc |
Use case diagram |
tmpl-comp |
Component diagram |
tmpl-state |
State diagram |
tmpl-er |
Entity definition |
tmpl-obj |
Object diagram |
tmpl-deploy |
Deployment diagram |
tmpl-mind |
Mindmap |
tmpl-gantt |
Gantt chart |
Short snippets:
| Prefix | Content |
|---|---|
part |
participant declaration |
actor |
actor declaration |
note |
Note block |
intf |
interface definition |
pkg |
package definition |
Mermaid Markdown Snippets (outside fenced blocks)
Expand a complete ```mermaid ... ``` block including fences:
| Prefix | Diagram |
|---|---|
mermaid |
Empty Mermaid block |
mermaid-flow |
Flowchart |
mermaid-sequence |
Sequence diagram |
mermaid-class |
Class diagram |
mermaid-state |
State diagram |
mermaid-er |
ER diagram |
mermaid-gantt |
Gantt chart |
mermaid-pie |
Pie chart |
mermaid-mindmap |
Mindmap |
mermaid-timeline |
Timeline |
mermaid-git |
Git graph |
Mermaid Snippets (inside fenced blocks)
Diagram templates (type tmpl to see all):
| Prefix | Content |
|---|---|
tmpl-flow |
Flowchart |
tmpl-seq |
Sequence diagram |
tmpl-cls |
Class diagram |
tmpl-state |
State diagram |
tmpl-er |
ER diagram |
tmpl-gantt |
Gantt chart |
tmpl-pie |
Pie chart |
tmpl-mind |
Mindmap |
tmpl-timeline |
Timeline |
tmpl-git |
Git graph |
D2 Markdown Snippets (outside fenced blocks)
Expand a complete ```d2 ... ``` block including fences:
| Prefix | Diagram |
|---|---|
d2 |
Empty D2 block |
d2-basic |
Basic connection |
d2-sequence |
Sequence diagram |
d2-class |
Class diagram |
d2-comp |
Component diagram |
d2-grid |
Grid layout |
d2-er |
ER diagram |
d2-flow |
Flowchart |
d2-icon |
Icon node |
d2-markdown |
Markdown text node |
d2-tooltip |
Tooltip and link |
d2-layers |
Layers/steps |
d2-style |
Custom style |
D2 Snippets (inside fenced blocks)
Diagram templates (type tmpl to see all):
| Prefix | Content |
|---|---|
tmpl-seq |
Sequence diagram |
tmpl-cls |
Class diagram |
tmpl-comp |
Component diagram |
tmpl-er |
ER diagram |
tmpl-flow |
Flowchart |
tmpl-grid |
Grid layout |
Short snippets:
| Prefix | Content |
|---|---|
conn |
Connection |
icon |
Icon node |
md |
Markdown node |
tooltip |
Tooltip and link |
layers |
Layers/steps |
style |
Custom style |
direction |
Layout direction |
Color Picker
Color swatches and an inline color picker for PlantUML, Mermaid, and D2. Works in standalone files (.puml, .mmd, .d2) and Markdown fenced blocks.
- 6-digit hex —
#FF0000,#1565C0etc. - 3-digit hex —
#F00,#ABCetc. - Named colors (PlantUML only) —
#Red,#LightBlue,#Salmonetc. (20 colors) - Picking a new color replaces the value with
#RRGGBBformat - Comment lines are excluded (
'for PlantUML,%%for Mermaid,#for D2)
Keyword Completion
Context-aware keyword suggestions for PlantUML, Mermaid, and D2. Works in both standalone files and Markdown fenced blocks.
PlantUML
- Line-start keywords —
@startuml,participant,class,skinparam,!include, etc. skinparamparameters — typeskinparamfollowed by a space, then get suggestions forbackgroundColor,defaultFontName,arrowColor, etc.- Color names — type
#to get color suggestions (Red,Blue,LightGreen, etc.) - Trigger characters:
@,!,#
Mermaid
- Diagram type declarations —
flowchart,sequenceDiagram,classDiagram,gantt, etc. on the first line - Diagram-specific keywords — suggestions change based on the declared diagram type (e.g.,
subgraphfor flowchart,participantfor sequence) - Direction values — type
directionfollowed by a space to getTB,LR, etc.
D2
- Shape types — type
shape:to get suggestions (rectangle,cylinder,person, etc.) - Style properties — type
style.to getfill,stroke,font-size, etc. - Direction values — type
direction:to getright,down,left,up - Constraint values — type
constraint:to getprimary_key,foreign_key,unique - Trigger characters:
:,.
Configuration
All settings use the plantumlMarkdownPreview. prefix.
| Setting | Default | Description |
|---|---|---|
mode |
"fast" |
Preset mode. "fast" (default) — local server, instant re-renders. "secure" — no network, highest security. "easy" — no setup required (diagram source sent to PlantUML server). |
javaPath |
"java" |
Path to Java executable. If set, used as-is; otherwise falls back to JAVA_HOME/bin/java, then java on PATH. (Fast and Secure modes) |
plantumlJarPath |
"" |
Path to plantuml.jar. Leave empty to use the bundled jar (LGPL). (Fast and Secure modes) |
dotPath |
"dot" |
Path to Graphviz dot executable (Fast and Secure modes) |
plantumlIncludePath |
"" |
Base directory for PlantUML !include directives. Leave empty to use the workspace root. Not available in Easy mode. |
allowLocalImages |
"mode-default" |
Resolve relative image paths (e.g. ) in the preview. "mode-default" uses the mode preset (Fast: on, Secure: off, Easy: on). "on" / "off" to override. |
allowHttpImages |
false |
Allow loading images over HTTP (unencrypted) in the preview. Useful for intranet or local development servers. |
previewTheme |
"github-light" |
Preview theme (see Themes) |
plantumlTheme |
"default" |
PlantUML diagram theme. "default" applies no theme. Other values (e.g. "cyborg", "mars") are passed as -theme to PlantUML CLI or injected as !theme directive in Easy mode. |
mermaidTheme |
"default" |
Mermaid diagram theme: "default", "dark", "forest", "neutral", or "base". |
plantumlScale |
"100%" |
PlantUML diagram scale. "auto" shrinks diagrams that exceed container width. A percentage (70%–120%) renders at that fraction of natural size. |
mermaidScale |
"80%" |
Mermaid diagram scale. "auto" scales to fit container width. A percentage (50%–100%) renders at that fraction of natural size. |
d2Theme |
"Neutral Default" |
D2 diagram theme. 19 built-in themes available (e.g. "Neutral Default", "Dark Mauve", "Terminal"). |
d2Layout |
"dagre" |
D2 layout engine: "dagre" (default, fast) or "elk" (better for complex graphs with many nodes). |
d2Scale |
"70%" |
D2 diagram scale. "auto" scales to fit container width. A percentage (50%–100%) renders at that fraction of natural size. |
htmlMaxWidth |
"960px" |
Maximum width of the exported HTML body. Options: "640px" – "1440px", or "none" for no limit. |
htmlAlignment |
"center" |
HTML body alignment. "center" (default) or "left". |
pdfScale |
0.625 |
PDF export scale factor. Scales text and diagrams uniformly. Range: 0.1–2.0. |
enableMath |
true |
Enable KaTeX math rendering. Supports $...$ (inline) and $$...$$ (block). Set to false if $ symbols cause unwanted math parsing. |
debounceNoDiagramChangeMs |
(empty) | Debounce delay (ms) for non-diagram text changes (diagrams served from cache). Leave empty to use the mode default (Fast: 100, Secure: 100, Easy: 100). |
debounceDiagramChangeMs |
(empty) | Debounce delay (ms) for diagram content changes. Leave empty to use the mode default (Fast: 100, Secure: 300, Easy: 300). |
plantumlLocalServerPort |
0 |
Port for the local PlantUML server (Fast mode only). 0 = auto-assign a free port. |
plantumlServerUrl |
"https://www.plantuml.com/plantuml" |
PlantUML server URL for Easy mode. Set to a self-hosted server URL for privacy. |
enableDiagramViewer |
true |
Enable the "Open in Diagram Viewer" context menu item when right-clicking a diagram. Requires reopening the preview to take effect. |
retainPreviewContext |
true |
Retain preview content when the tab is hidden. Prevents re-rendering on tab switch but uses more memory. Requires reopening the preview to take effect. |
Note:
allowLocalImagesandallowHttpImagesapply only to the preview panel. HTML export always outputs original image paths without CSP restrictions.
Preview theme options
| Value | Description |
|---|---|
github-light |
GitHub Light — white background (default) |
atom-light |
Atom Light — soft gray text, Atom inspired |
one-light |
One Light — off-white, balanced palette |
solarized-light |
Solarized Light — warm beige, eye-friendly |
vue |
Vue — green accents, Vue.js docs inspired |
pen-paper-coffee |
Pen Paper Coffee — warm paper, handwritten aesthetic |
coy |
Coy — near-white, clean design |
vs |
VS — classic Visual Studio colors |
github-dark |
GitHub Dark — dark background |
atom-dark |
Atom Dark — Tomorrow Night palette |
one-dark |
One Dark — Atom-inspired dark |
dracula |
Dracula — vibrant dark palette |
solarized-dark |
Solarized Dark — deep teal, eye-friendly |
monokai |
Monokai — vivid syntax, Sublime Text inspired |
Keyboard Shortcuts
| Command | Mac | Windows / Linux |
|---|---|---|
| Open Preview to Side (Markdown) | Cmd+Alt+V |
Ctrl+Alt+V |
| Preview PlantUML File | Cmd+Alt+V |
Ctrl+Alt+V |
| Preview Mermaid File | Cmd+Alt+V |
Ctrl+Alt+V |
| Preview D2 File | Cmd+Alt+V |
Ctrl+Alt+V |
| Select Rendering Mode | — | — |
FAQ
PlantUML diagrams are not rendering
Fast / Secure mode:
- Run
java -versionin your terminal to confirm Java 11 or later is installed - If you use class, component, or other layout-dependent diagrams, run
dot -Vto confirm Graphviz is installed (see Diagram Support) - If you set a custom
plantumlJarPath, verify it points to a validplantuml.jarfile. If the path does not exist, the extension falls back to the bundled jar with a warning. IfplantumlJarPathis empty (default), the bundled LGPL jar is used automatically - Check the VS Code Output panel for error messages
Easy mode:
- Verify the server URL is correct (default:
https://www.plantuml.com/plantuml) - Check your network connection — the extension needs to reach the PlantUML server
- If using a self-hosted server, ensure it is running and accessible
- Requests to the server time out after 15 seconds (Fast and Secure modes also have a 15-second timeout per diagram)
D2 diagrams are not rendering
D2 is rendered using a built-in Wasm module — no external CLI is required.
- Reload the VS Code window (
Developer: Reload Window) - Check the VS Code Output panel for error messages
- Ensure your D2 source syntax is valid
Can I use PlantUML without installing Java?
Yes. Set mode to "easy" in the extension settings. Easy mode sends your
PlantUML text to a PlantUML server for rendering and does not require Java.
By default the public server at https://www.plantuml.com/plantuml is used.
For privacy, you can run your own PlantUML server and set plantumlServerUrl to its URL.
Secure mode is slow with many diagrams. How can I speed it up?
Switch to Fast mode (mode: "fast"). It starts a persistent
PlantUML server on localhost, so re-renders are instant — no JVM startup cost per edit.
Is my diagram data safe in Easy mode?
In Easy mode, PlantUML source text is sent to the configured server.
The default public server (https://www.plantuml.com/plantuml) is operated by the
PlantUML project. If your diagrams contain sensitive information, consider
running a self-hosted PlantUML server and setting
plantumlServerUrl to its URL, or use Fast or Secure mode where diagrams never leave your machine.
Diagrams look wrong with a dark theme
Set a diagram theme to match your preview theme. Open the theme picker from the
title bar icon and select a dark PlantUML theme (e.g. cyborg, mars) or set the Mermaid theme to dark.
!include is not working
!include requires Fast or Secure mode — it does not work in Easy mode because
the remote server cannot access your local files.
- Paths are resolved relative to the workspace root by default. Set
plantumlIncludePathto use a different base directory. - Saving an included file automatically refreshes the preview. You can also click the Reload button (↻) to force a manual refresh.
Can I use !theme inside my PlantUML code?
Yes. An inline !theme directive takes precedence over the extension setting.
Contributing
See CONTRIBUTING.md for development setup, build instructions, and pull request guidelines.
Third-Party Licenses
This extension bundles the following third-party software:
- PlantUML (LGPL version) — GNU Lesser General Public License v3 (LGPL-3.0). See the PlantUML license page for details.
- mermaid.js — MIT License
- KaTeX — MIT License
- @terrastruct/d2 (Wasm build) — Mozilla Public License 2.0 (MPL-2.0)