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

If running under VSCode, automatically set resize_to = :body #3708

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

staticfloat
Copy link
Contributor

This gives a better default experience for users plotting inside of VSCode. It detects the presence of VSCode by looking to see if VSCodeServer is in Base.loaded_modules, which it should never be unless we're running inside the language server.

Type of change

Delete options that do not apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

This gives a better default experience for users plotting inside of
VSCode.  It detects the presence of VSCode by looking to see if
`VSCodeServer` is in `Base.loaded_modules`, which it should never be
unless we're running inside the language server.
@SimonDanisch
Copy link
Member

Good idea, but this will be sadly a global setting, applying to people not using the plot pane and just developing a Bonito App with inlined plots.
I think we can add a condition in backend_show to check for the vscode MIME and then wrap the scene in a WGLMakie.WithConfig(scene; resize_to=:body): https://github.com/MakieOrg/Makie.jl/blob/master/WGLMakie/src/display.jl#L169-L179

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

Successfully merging this pull request may close these issues.

None yet

2 participants