Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vs code - show preview & compile options not working #147

Open
krish777 opened this issue Aug 14, 2024 · 1 comment
Open

vs code - show preview & compile options not working #147

krish777 opened this issue Aug 14, 2024 · 1 comment

Comments

@krish777
Copy link

When d2 source contains d2-config section, the style and layout mentioned in d2 file are not working when d2 preview option or d2 compile to SVG is selected from vscode menu. It works only when the compilation is done outside vs code editor.

vars: {
d2-config: {
theme-id: 4
dark-theme-id: 300
layout-engine: elk
}
}
1
2
3
4
5

  • -> a
@qd3v
Copy link

qd3v commented Nov 5, 2024

Same here, also would be nice to customize CLI args using VS config plugin's section.

I'm using these to build final PDF and rendering in Chrome:

CONTAINER_PADDING=32
ELK_PADDING="[top=$(CONTAINER_PADDING),left=$(CONTAINER_PADDING),bottom=$(CONTAINER_PADDING),right=$(CONTAINER_PADDING)]"
ELK_ARGS=--layout=elk --elk-padding=$(ELK_PADDING)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants