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

Allow for setting Layout, Theme and Sketch options per document #123

Open
asanjabi opened this issue Aug 30, 2023 · 6 comments
Open

Allow for setting Layout, Theme and Sketch options per document #123

asanjabi opened this issue Aug 30, 2023 · 6 comments

Comments

@asanjabi
Copy link

If there a none option in the settings, then user would have the option of setting these values through the variables per document.
Or maybe an option for the CLI to reverse the override priority to document over CLI parameters.

@alixander
Copy link
Contributor

ah i didn't realize this wasn't working in d2 preview.

Screen Shot 2023-08-30 at 4 26 20 AM

indeed, i suspect that this extension is passing in default values through the CLI, which takes priority. Instead, they should be omitted, which will let the variable configurations take priority over default values

@BarryNolte
Copy link
Collaborator

@alixander So the solution is to have a "none" option in the theme and sketch options, that would then omit the CLI options? What about layout?

@asanjabi
Copy link
Author

I think the same pattern would work for layout also, I'd love to see that as an option :)

@alixander
Copy link
Contributor

@alixander So the solution is to have a "none" option in the theme and sketch options, that would then omit the CLI options? What about layout?

No the solution is to just omit the flags if they are default.

BarryNolte added a commit to BarryNolte/d2-vscode that referenced this issue Aug 31, 2023
@artk42
Copy link

artk42 commented Jul 19, 2024

setting render layout engine per document is crucial obviously, a lot of hassle brings that vars not working as expected. Curios why it's working correctly on d2 Playground, which is also VSCode based

@SimonSchick
Copy link

We started playing with the vscode extension but ran into this as well, we locally edited the extension to make this work but this is obviously not a sustainable solution, imo the vscode settings should not override the project settings.

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

5 participants