Last active
May 2, 2022 03:50
-
-
Save skuroda/5173451 to your computer and use it in GitHub Desktop.
Snippet from modified dot.tmLanguage file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"fileTypes": [ | |
"dot", | |
"DOT" | |
], | |
"foldingStartMarker": "\\{", | |
"foldingStopMarker": "\\}", | |
"keyEquivalent": "^~G", | |
"name": "Graphviz (DOT)", | |
"patterns": [ | |
{ | |
"begin": "\\s*(label)\\s*=\\s*(<)", | |
"beginCaptures": { | |
"1": { | |
"name": "support.constant.attribute.node.dot" | |
}, | |
"2": { | |
"name": "punctuation.definition.label.begin.dot" | |
} | |
}, | |
"end": ">", | |
"endCaptures": { | |
"0": { | |
"name": "puncutation.definition.label.end.dot" | |
} | |
}, | |
"name": "meta.label.dot", | |
"patterns": [ | |
{ | |
"include": "text.html.basic" | |
} | |
] | |
}, | |
{ | |
"match": "\\b(node|edge|graph|digraph|subgraph|strict)\\b", | |
"name": "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", | |
"name": "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", | |
"name": "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", | |
"name": "support.constant.attribute.graph.dot" | |
}, | |
{ | |
"begin": "\"", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.dot" | |
} | |
}, | |
"end": "\"", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.dot" | |
} | |
}, | |
"name": "string.quoted.double.dot", | |
"patterns": [ | |
{ | |
"match": "\\\\.", | |
"name": "constant.character.escape.dot" | |
} | |
] | |
}, | |
{ | |
"captures": { | |
"1": { | |
"name": "punctuation.definition.comment.dot" | |
} | |
}, | |
"match": "(//).*$\\n?", | |
"name": "comment.line.double-slash.dot" | |
}, | |
{ | |
"captures": { | |
"1": { | |
"name": "punctuation.definition.comment.dot" | |
} | |
}, | |
"match": "(#).*$\\n?", | |
"name": "comment.line.number-sign.dot" | |
}, | |
{ | |
"begin": "/\\*", | |
"captures": { | |
"0": { | |
"name": "punctuation.definition.comment.dot" | |
} | |
}, | |
"end": "\\*/", | |
"name": "comment.block.dot" | |
} | |
], | |
"repository": { | |
"doublequotedString": { | |
"begin": "\"", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.dot" | |
} | |
}, | |
"end": "\"", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.dot" | |
} | |
}, | |
"name": "string.quoted.double.dot", | |
"patterns": [ | |
{ | |
"include": "#entity" | |
}, | |
{ | |
"include": "#bare-ampersand" | |
} | |
] | |
}, | |
"singlequotedString": { | |
"begin": "'", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.dot" | |
} | |
}, | |
"end": "'", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.dot" | |
} | |
}, | |
"name": "string.quoted.single.dot", | |
"patterns": [ | |
{ | |
"include": "#entity" | |
}, | |
{ | |
"include": "#bare-ampersand" | |
} | |
] | |
}, | |
"tagStuff": { | |
"patterns": [ | |
{ | |
"captures": { | |
"1": { | |
"name": "entity.other.attribute-name.namespace.dot" | |
}, | |
"2": { | |
"name": "entity.other.attribute-name.dot" | |
}, | |
"3": { | |
"name": "punctuation.separator.namespace.dot" | |
}, | |
"4": { | |
"name": "entity.other.attribute-name.localname.dot" | |
} | |
}, | |
"match": " (?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9]+)=" | |
}, | |
{ | |
"include": "#doublequotedString" | |
}, | |
{ | |
"include": "#singlequotedString" | |
} | |
] | |
}, | |
"xmlPatterns": { | |
"patterns": [ | |
{ | |
"begin": "(</?)(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)", | |
"captures": { | |
"1": { | |
"name": "punctuation.definition.tag.begin.dot" | |
}, | |
"2": { | |
"name": "entity.name.tag.namespace.dot" | |
}, | |
"3": { | |
"name": "entity.name.tag.dot" | |
}, | |
"4": { | |
"name": "punctuation.separator.namespace.dot" | |
}, | |
"5": { | |
"name": "entity.name.tag.localname.dot" | |
} | |
}, | |
"end": "(/?>)", | |
"endCaptures": { | |
"1": { | |
"name": "punctuation.definition.tag.end.dot" | |
} | |
}, | |
"name": "meta.tag.dot", | |
"patterns": [ | |
{ | |
"include": "#tagStuff" | |
} | |
] | |
} | |
] | |
} | |
}, | |
"scopeName": "source.dot", | |
"uuid": "1A53D54E-6B1D-11D9-A006-000D93589AF6" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment