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

Support adding an include file via configuration #73

Open
jgabrielygalan opened this issue Jun 4, 2020 · 1 comment
Open

Support adding an include file via configuration #73

jgabrielygalan opened this issue Jun 4, 2020 · 1 comment

Comments

@jgabrielygalan
Copy link

It would be great if we could add a configuration flag pointing to an include file and have the plugin include this file in the call to plantuml.jar. (-I command line flag).

The use case is that I have an include file to tune the look and feel of the diagrams and it would be very useful if I could have the plugin pick it up.

@jgabrielygalan
Copy link
Author

jgabrielygalan commented Jun 4, 2020

I made it work locally, but I don't have time now to make a proper PR. Here are my changes just in case:

diagram/_init_.py:
proc.INCLUDE_FILE = sublime_settings.get('include_file', None)

diagram/plantuml.py:

    include_file = self.proc.INCLUDE_FILE
    if include_file:
        print('including file: ' + include_file)
        command.append('-I' + include_file)

It works fine with a settings file like this:

{
"include_file": "my path to a include file"
}

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

1 participant