sublime_diagram_plugin icon indicating copy to clipboard operation
sublime_diagram_plugin copied to clipboard

Support adding an include file via configuration

Open jgabrielygalan opened this issue 4 years ago • 1 comments

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 avatar Jun 04 '20 14:06 jgabrielygalan

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" }

jgabrielygalan avatar Jun 04 '20 15:06 jgabrielygalan