%YAML 1.2 --- name: Generic Config file_extensions: [cfg, conf, config, ini, pro] scope: source.genconfig contexts: main: - match: '(?:(?:^\s*)|\s+)#([a-fA-F0-9]{8}|[a-fA-F0-9]{6}|[a-fA-F0-9]{3})\b' comment: "Color (with alpha): #aacc4322, #bf34fa, #ccc" scope: constant.other.genconfig - match: (?:(?:^\s*)|\s+)(?:(#.*)|(--\s+.*)|(\/\/.*))$ comment: One line comment scope: meta.comment.genconfig captures: 1: comment.line.number-sign.genconfig 2: comment.line.double-dash.genconfig 3: comment.line.double-slash.genconfig - match: (?:(?:^\s*)|\s+);\s*(?=.).*$ comment: ; one line comment scope: comment.line.number-sign.genconfig - match: \b(?:\d+\.){3}\d+(?:\:\d+)?\b scope: meta.ip.genconfig constant.other.genconfig - match: \b[0-9]+([a-zA-Z]+)?\b comment: Number or number with unit (like 10k, 12M, 92dpi etc) and also hex like values 0xdf scope: constant.numeric.genconfig - match: \b([tT]rue|[fF]alse|TRUE|FALSE)\b comment: Constant scope: constant.language.genconfig - match: \b(?\s*$) comment: "One line word, or word with following {, or [word] or " scope: storage.type.genconfig - match: '"' push: double_string - match: "'" push: single_string - match: \\" push: quoted_double_string - match: \\' push: quoted_single_string - match: (^\s*|\b)(?|\?|\/|\*|\|) comment: Operators scope: keyword.operator.genconfig - match: \b(?