%YAML 1.2 --- # http://www.sublimetext.com/docs/3/syntax.html name: Graphviz (DOT) file_extensions: - dot - DOT - gv scope: source.dot contexts: main: - include: expressions expressions: - match: \b((sub|di)?graph)\b\s+((cluster_)?\w+)\b captures: 1: storage.type.dot 3: entity.name.graph.dot 4: meta.annotation.dot variable.annotation.cluster.dot - match: \b(node|edge|graph|digraph|subgraph|strict)\b scope: storage.type.dot - match: \b(bottomlabel|color|comment|distortion|fillcolor|fixedsize|fontcolor|fontname|fontsize|group|height|label|layer|orientation|peripheries|regular|shape|shapefile|sides|skew|style|toplabel|URL|width|z)\b scope: support.constant.attribute.node.dot - match: \b(arrowhead|arrowsize|arrowtail|color|comment|constraint|decorate|dir|fontcolor|fontname|fontsize|headlabel|headport|headURL|label|labelangle|labeldistance|labelfloat|labelcolor|labelfontname|labelfontsize|layer|lhead|ltail|minlen|samehead|sametail|style|taillabel|tailport|tailURL|weight)\b scope: support.constant.attribute.edge.dot - match: \b(bgcolor|center|clusterrank|color|comment|compound|concentrate|fillcolor|fontname|fontpath|fontsize|label|labeljust|labelloc|layers|margin|mclimit|nodesep|nslimit|nslimit1|ordering|orientation|page|pagedir|quantum|rank|rankdir|ranksep|ratio|remincross|rotate|samplepoints|searchsize|size|style|URL)\b scope: support.constant.attribute.graph.dot - match: '-[->]' scope: punctuation.operator.relationship.dot - match: '=' scope: keyword.operator.assignment.dot - match: ';' scope: punctuation.separator.statement.dot - match: '"' scope: punctuation.definition.string.begin.dot push: - meta_scope: string.quoted.double.dot - match: '"' scope: punctuation.definition.string.end.dot pop: true - match: \\. scope: constant.character.escape.dot - match: '[{}|]' scope: punctuation.separator.memory-block.dot - include: braces - include: brackets - include: embedded-html - include: comments # http://www.graphviz.org/content/node-shapes#html embedded-html: - match: '<' scope: punctuation.section.embedded.begin.dot push: - meta_content_scope: source.dot.embedded.html - match: '((>)?\s*)(>)' captures: 1: source.dot.embedded.html 2: meta.tag punctuation.definition.tag.end.html 3: punctuation.section.embedded.end.dot pop: true - match: '' embed: scope:text.html.basic escape: (?=>\s*>) braces: - match: \{ scope: punctuation.definition.group.begin.dot push: - meta_scope: meta.group.dot - match: \} scope: punctuation.definition.group.end.dot pop: true - match: '[,;]' scope: punctuation.separator.dot - include: expressions brackets: - match: \[ scope: punctuation.definition.attributes.begin.dot push: - meta_scope: meta.attributes.dot - match: \] scope: punctuation.definition.attributes.end.dot pop: true - match: '[,;]' scope: punctuation.separator.dot - include: expressions comments: - match: // scope: punctuation.definition.comment.dot push: - meta_scope: comment.line.double-slash.dot - match: $\n? pop: true - match: '#' scope: punctuation.definition.comment.dot push: - meta_scope: comment.line.number-sign.dot - match: $\n? pop: true - match: /\* scope: punctuation.definition.comment.dot push: - meta_scope: comment.block.dot - match: \*/ scope: punctuation.definition.comment.dot pop: true - match: ^\s*(\*)(?!/) captures: 1: punctuation.definition.comment.dot