Created
February 6, 2019 23:40
-
-
Save glachancecmaisonneuve/aa0a2a9018bde315a4b5e30aec0a1f4c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ | |
"name": "Ini", | |
"scopeName": "source.ini", | |
"patterns": [ | |
{ | |
"begin": "(^[ \\t]+)?(?=#)", | |
"beginCaptures": { | |
"1": { | |
"name": "punctuation.whitespace.comment.leading.ini" | |
} | |
}, | |
"end": "(?!\\G)", | |
"patterns": [ | |
{ | |
"begin": "#", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.comment.ini" | |
} | |
}, | |
"end": "\\n", | |
"name": "comment.line.number-sign.ini" | |
} | |
] | |
}, | |
{ | |
"begin": "(^[ \\t]+)?(?=;)", | |
"beginCaptures": { | |
"1": { | |
"name": "punctuation.whitespace.comment.leading.ini" | |
} | |
}, | |
"end": "(?!\\G)", | |
"patterns": [ | |
{ | |
"begin": ";", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.comment.ini" | |
} | |
}, | |
"end": "\\n", | |
"name": "comment.line.semicolon.ini" | |
} | |
] | |
}, | |
{ | |
"captures": { | |
"1": { | |
"name": "keyword.other.definition.ini" | |
}, | |
"2": { | |
"name": "punctuation.separator.key-value.ini" | |
} | |
}, | |
"match": "\\b([^=]+)\\b\\s*(=)" | |
}, | |
{ | |
"captures": { | |
"1": { | |
"name": "punctuation.definition.entity.ini" | |
}, | |
"3": { | |
"name": "punctuation.definition.entity.ini" | |
} | |
}, | |
"match": "^(\\[)(.*?)(\\])", | |
"name": "entity.name.section.group-title.ini" | |
}, | |
{ | |
"begin": "=\\s*\\K\\s*'", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.ini" | |
} | |
}, | |
"end": "(?<!\\\\)(?:\\\\\\\\)*\\K'", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.ini" | |
} | |
}, | |
"name": "string.quoted.single.ini", | |
"patterns": [ | |
{ | |
"include": "#escape" | |
} | |
] | |
}, | |
{ | |
"begin": "=\\s*\\K\"", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.ini" | |
} | |
}, | |
"end": "(?<!\\\\)(?:\\\\\\\\)*\\K\"", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.ini" | |
} | |
}, | |
"name": "string.quoted.double.ini", | |
"patterns": [ | |
{ | |
"include": "#escape" | |
} | |
] | |
}, | |
{ | |
"begin": "=\\s*\\K`", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.ini" | |
} | |
}, | |
"end": "(?<!\\\\)(?:\\\\\\\\)*\\K`", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.ini" | |
} | |
}, | |
"name": "string.interpolated.ini", | |
"patterns": [ | |
{ | |
"include": "#escape" | |
} | |
] | |
}, | |
{ | |
"begin": "=\\s*(?!$)\\K", | |
"contentName": "string.unquoted.ini", | |
"end": "\\s*(?=[\\n;#])", | |
"patterns": [ | |
{ | |
"include": "#escape" | |
}, | |
{ | |
"match": "\\b[0-9]+\\b", | |
"name": "constant.numeric.ini" | |
} | |
] | |
} | |
], | |
"repository": { | |
"escape": { | |
"match": "\\\\.", | |
"name": "constant.character.escape.ini" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment