{ "name": "YASnippet", "scopeName": "source.yasnippet", "patterns": [ { "include": "#main" } ], "repository": { "body": { "name": "meta.snippet-body.yasnippet", "begin": "^\\s*(#+)\\s*(--)\\s*$\\n?", "end": "(?=A)B", "patterns": [ { "include": "#tab-stops" }, { "include": "#indentation-marker" }, { "include": "#placeholder-fields" }, { "include": "#escaped-characters" }, { "include": "#embedded-lisp" } ], "beginCaptures": { "0": { "name": "comment.line.number-sign.yasnippet" }, "1": { "name": "punctuation.definition.comment.number-sign.yasnippet" }, "2": { "name": "punctuation.terminator.double-dash.yasnippet" } } }, "directives": { "patterns": [ { "name": "meta.directive.snippet-$1.yasnippet", "match": "(?\u003c=[\\s#])(key|name|group|uuid|contributor)\\s*(:)(?:\\s*(\\S.*))?", "captures": { "1": { "name": "variable.assignment.$1.yasnippet" }, "2": { "name": "punctuation.separator.dictionary.key-value.colon.yasnippet" }, "3": { "name": "string.unquoted.yasnippet" } } }, { "name": "meta.directive.snippet-$1.yasnippet", "match": "(?\u003c=[\\s#])(condition|expand-env)\\s*(:)(?:\\s*(\\S.*))?", "captures": { "1": { "name": "variable.assignment.$1.yasnippet" }, "2": { "name": "punctuation.separator.dictionary.key-value.colon.yasnippet" }, "3": { "name": "source.embedded.emacs.lisp", "patterns": [ { "include": "source.emacs.lisp" } ] } } }, { "name": "meta.directive.keybinding.yasnippet", "match": "(?\u003c=[\\s#])(binding)\\s*(:)(?:\\s*(\\S.*))?", "captures": { "1": { "name": "variable.assignment.$1.yasnippet" }, "2": { "name": "punctuation.separator.dictionary.key-value.colon.yasnippet" }, "3": { "patterns": [ { "include": "source.emacs.lisp#key-notation" } ] } } }, { "begin": "(?\u003c=[\\s#])(type)\\s*(:)(?:\\s*(command))(?=\\s*$)", "end": "(?=A)B", "patterns": [ { "begin": "\\G", "end": "^(?=\\s*#+\\s*--\\s*$)", "patterns": [ { "include": "#prologue-lines" } ] }, { "name": "meta.snippet-body.yasnippet", "contentName": "source.embedded.emacs.lisp", "begin": "^\\s*(#+)\\s*(--)\\s*$\\n?", "end": "(?=A)B", "patterns": [ { "include": "source.emacs.lisp" } ], "beginCaptures": { "0": { "name": "comment.line.number-sign.yasnippet" }, "1": { "name": "punctuation.definition.comment.number-sign.yasnippet" }, "2": { "name": "punctuation.terminator.double-dash.yasnippet" } } } ], "beginCaptures": { "0": { "name": "meta.directive.type.yasnippet" }, "1": { "name": "variable.assignment.$1.yasnippet" }, "2": { "name": "punctuation.separator.dictionary.key-value.colon.yasnippet" }, "3": { "name": "constant.language.type-specifier.yasnippet" } } }, { "name": "meta.directive.type.yasnippet", "match": "(?\u003c=[\\s#])(type)\\s*(:)(?:\\s*(?!command\\s*$)(\\S.*))", "captures": { "1": { "name": "variable.assignment.$1.yasnippet" }, "2": { "name": "punctuation.separator.dictionary.key-value.colon.yasnippet" }, "3": { "name": "constant.language.type-specifier.yasnippet" } } }, { "name": "meta.directive.other.yasnippet", "match": "(?\u003c=[\\s#])([^:\\s#]+)\\s*(:)(?:\\s*(\\S.*))?", "captures": { "1": { "name": "variable.assignment.custom.yasnippet" }, "2": { "name": "punctuation.separator.dictionary.key-value.colon.yasnippet" }, "3": { "name": "string.unquoted.yasnippet" } } } ] }, "embedded-lisp": { "name": "string.interpolated.yasnippet", "contentName": "source.embedded.emacs.lisp", "begin": "`", "end": "`", "patterns": [ { "include": "source.emacs.lisp" } ], "beginCaptures": { "0": { "name": "punctuation.section.begin.embedded.yasnippet" } }, "endCaptures": { "0": { "name": "punctuation.section.end.embedded.yasnippet" } } }, "escaped-characters": { "patterns": [ { "name": "constant.character.escape.backslash.yasnippet", "match": "(\\\\)\\\\", "captures": { "1": { "name": "punctuation.definition.escape.yasnippet" } } }, { "name": "constant.character.escape.dollar-sign.yasnippet", "match": "(\\\\)\\$", "captures": { "1": { "name": "punctuation.definition.escape.yasnippet" } } }, { "name": "constant.character.escape.backtick.yasnippet", "match": "(\\\\)`", "captures": { "1": { "name": "punctuation.definition.escape.yasnippet" } } } ] }, "indentation-marker": { "name": "keyword.operator.indentation-marker.yasnippet", "match": "(\\$)\u003e", "captures": { "1": { "name": "punctuation.definition.variable.sigil.dollar-sign.yasnippet" } } }, "main": { "patterns": [ { "include": "#prologue" }, { "include": "#body" } ] }, "numbered-placeholder": { "name": "meta.placeholder-field.numbered.$2-nth.yasnippet", "contentName": "string.unquoted.default-text.yasnippet", "begin": "(\\${)([0-9]+)(:)", "end": "}", "patterns": [ { "include": "#placeholder-innards" } ], "beginCaptures": { "1": { "name": "punctuation.section.embedded.field.begin.yasnippet" }, "2": { "name": "constant.numeric.integer.int.decimal.yasnippet" }, "3": { "name": "punctuation.separator.colon.field.yasnippet" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.field.end.yasnippet" } } }, "placeholder-fields": { "patterns": [ { "include": "#numbered-placeholder" }, { "include": "#unnumbered-placeholder" } ] }, "placeholder-innards": { "patterns": [ { "include": "#escaped-characters" }, { "include": "#embedded-lisp" }, { "include": "#placeholder-fields" }, { "name": "meta.transformation.yasnippet", "contentName": "source.embedded.emacs.lisp", "begin": "\\${1,2}(?=\\()", "end": "(?\u003c=\\))", "patterns": [ { "include": "source.emacs.lisp" } ], "beginCaptures": { "0": { "name": "keyword.operator.transformation.yasnippet" } } } ] }, "prologue": { "name": "meta.prologue.yasnippet", "begin": "\\A", "end": "^(?=\\s*#+\\s*--\\s*$)", "patterns": [ { "include": "#prologue-lines" } ] }, "prologue-lines": { "begin": "^\\s*(#+)(?!\\s*--\\s*$)", "end": "$", "patterns": [ { "contentName": "comment.line.modeline.yasnippet", "begin": "(?=-\\*-)", "end": "$", "patterns": [ { "include": "source.emacs.lisp#modeline" } ] }, { "include": "#directives" } ], "beginCaptures": { "1": { "name": "punctuation.definition.comment.number-sign.yasnippet" } } }, "tab-stops": { "name": "variable.positional.$2-nth.tab-stop.yasnippet", "match": "(\\$)([0-9]+)", "captures": { "1": { "name": "punctuation.definition.variable.sigil.dollar-sign.yasnippet" } } }, "unnumbered-placeholder": { "name": "meta.placeholder-field.unnumbered.yasnippet", "contentName": "string.unquoted.default-text.yasnippet", "begin": "(\\${)(:)", "end": "}", "patterns": [ { "include": "#placeholder-innards" } ], "beginCaptures": { "1": { "name": "punctuation.section.embedded.field.begin.yasnippet" }, "2": { "name": "punctuation.separator.colon.field.yasnippet" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.field.end.yasnippet" } } } } }