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

PlantUML Preview will be launched with Alt + D even for non-Diagram files #7

Closed
koara-local opened this issue Feb 28, 2017 · 4 comments

Comments

@koara-local
Copy link
Contributor

Hello. Thank you for a useful plugin.

--

Can I restrict PlantUML Preview startup to diagram files only?

For example in Python PlantUML Preview will be launched with Alt + D.

python_plantuml

Thank you.

@koara-local
Copy link
Contributor Author

Do you mean that you can write diagrams in comments? If so, I'm sorry.

python_plantuml2

@qjebbs
Copy link
Owner

qjebbs commented Feb 28, 2017

Yes. I've been thinking about this behavior for a while, I ever disabled for non-diagram document, but enabled it at last. The reason is just as you said, and this is also how plantuml.jar behaves.

image

Maybe, I should add a setting, leave it to user to decide?

@qjebbs
Copy link
Owner

qjebbs commented Feb 28, 2017

Maybe a better way. When alt-D trigged,:
First, I detect if any diagram at cursor. If yes, preview shows.
If not, I detect if any diagrams in document. If yes, preview still shows, but prompt no valid diagram here. If not, nothing happens.

No setting, not annoying..

@koara-local
Copy link
Contributor Author

It is a very good idea if it can be implemented!
I understand that this is the specification, so I will close this Issue.
thank you for your answer.

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