{ "name": "JavaServer Pages", "scopeName": "text.html.jsp", "patterns": [ { "include": "#xml_tags" }, { "include": "text.html.basic" } ], "repository": { "comment": { "name": "comment.block.jsp", "begin": "\u003c%--", "end": "--%\u003e", "captures": { "0": { "name": "punctuation.definition.comment.jsp" } } }, "declaration": { "name": "meta.embedded.line.declaration.jsp", "contentName": "source.java", "begin": "\u003c%!", "end": "(%)\u003e", "patterns": [ { "include": "source.java" } ], "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.jsp" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.end.jsp" }, "1": { "name": "source.java" } } }, "el_expression": { "name": "meta.embedded.line.el_expression.jsp", "contentName": "source.java", "begin": "\\$\\{", "end": "(\\})", "patterns": [ { "include": "source.java" } ], "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.jsp" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.end.jsp" }, "1": { "name": "source.java" } } }, "expression": { "name": "meta.embedded.line.expression.jsp", "contentName": "source.java", "begin": "\u003c%=", "end": "(%)\u003e", "patterns": [ { "include": "source.java" } ], "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.jsp" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.end.jsp" }, "1": { "name": "source.java" } } }, "scriptlet": { "name": "meta.embedded.block.scriptlet.jsp", "contentName": "source.java", "begin": "\u003c%", "end": "(%)\u003e", "patterns": [ { "name": "punctuation.section.scope.begin.java", "match": "\\{" }, { "name": "punctuation.section.scope.end.java", "match": "\\}" }, { "include": "source.java" } ], "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.jsp" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.end.jsp" }, "1": { "name": "source.java" } } }, "tags": { "name": "meta.tag.template.include.jsp", "begin": "(\u003c%@)\\s*(?=(attribute|include|page|tag|taglib|variable)\\s)", "end": "%\u003e", "patterns": [ { "begin": "\\G(attribute)(?=\\s)", "end": "(?=%\u003e)", "patterns": [ { "match": "(name|required|fragment|rtexprvalue|type|description)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.attribute.jsp" } } }, { "begin": "\\G(include)(?=\\s)", "end": "(?=%\u003e)", "patterns": [ { "match": "(file)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.include.jsp" } } }, { "begin": "\\G(page)(?=\\s)", "end": "(?=%\u003e)", "patterns": [ { "match": "(language|extends|import|session|buffer|autoFlush|isThreadSafe|info|errorPage|isErrorPage|contentType|pageEncoding|isElIgnored)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.page.jsp" } } }, { "begin": "\\G(tag)(?=\\s)", "end": "(?=%\u003e)", "patterns": [ { "match": "(display-name|body-content|dynamic-attributes|small-icon|large-icon|description|example|language|import|pageEncoding|isELIgnored)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.tag.jsp" } } }, { "begin": "\\G(taglib)(?=\\s)", "end": "(?=%\u003e)", "patterns": [ { "match": "(uri|tagdir|prefix)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.taglib.jsp" } } }, { "begin": "\\G(variable)(?=\\s)", "end": "(?=%\u003e)", "patterns": [ { "match": "(name-given|alias|variable-class|declare|scope|description)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.variable.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, "xml_tags": { "patterns": [ { "begin": "(^\\s*)(?=\u003cjsp:(declaration|expression|scriptlet)\u003e)", "end": "(?!\\G)(\\s*$\\n)?", "patterns": [ { "include": "#embedded" } ], "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.erb" } }, "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.erb" } } }, { "include": "#embedded" }, { "include": "#directive" }, { "include": "#actions" } ], "repository": { "actions": { "patterns": [ { "name": "meta.tag.template.attribute.jsp", "begin": "(\u003c/?)(jsp:attribute)\\b", "end": "\u003e", "patterns": [ { "match": "(name|trim)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.body.jsp", "match": "(\u003c/?)(jsp:body)(\u003e)", "captures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" }, "3": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.element.jsp", "begin": "(\u003c/?)(jsp:element)\\b", "end": "\u003e", "patterns": [ { "match": "(name)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.dobody.jsp", "begin": "(\u003c)(jsp:doBody)\\b", "end": "/\u003e", "patterns": [ { "match": "(var|varReader|scope)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.forward.jsp", "begin": "(\u003c/?)(jsp:forward)\\b", "end": "/?\u003e", "patterns": [ { "match": "(page)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.param.jsp", "begin": "(\u003c)(jsp:param)\\b", "end": "/\u003e", "patterns": [ { "match": "(name|value)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.getproperty.jsp", "begin": "(\u003c)(jsp:getProperty)\\b", "end": "/\u003e", "patterns": [ { "match": "(name|property)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.include.jsp", "begin": "(\u003c/?)(jsp:include)\\b", "end": "/?\u003e", "patterns": [ { "match": "(page|flush)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.invoke.jsp", "begin": "(\u003c)(jsp:invoke)\\b", "end": "/\u003e", "patterns": [ { "match": "(fragment|var|varReader|scope)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.output.jsp", "begin": "(\u003c)(jsp:output)\\b", "end": "/\u003e", "patterns": [ { "match": "(omit-xml-declaration|doctype-root-element|doctype-system|doctype-public)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.plugin.jsp", "begin": "(\u003c/?)(jsp:plugin)\\b", "end": "\u003e", "patterns": [ { "match": "(type|code|codebase|name|archive|align|height|hspace|jreversion|nspluginurl|iepluginurl)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.fallback.jsp", "match": "(\u003c/?)(jsp:fallback)(\u003e)", "end": "\u003e", "captures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" }, "3": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.root.jsp", "begin": "(\u003c/?)(jsp:root)\\b", "end": "\u003e", "patterns": [ { "match": "(xmlns|version|xmlns:taglibPrefix)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.setproperty.jsp", "begin": "(\u003c)(jsp:setProperty)\\b", "end": "/\u003e", "patterns": [ { "match": "(name|property|value)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.text.jsp", "match": "(\u003c/?)(jsp:text)(\u003e)", "end": "\u003e", "captures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" }, "3": { "name": "punctuation.definition.tag.end.jsp" } } }, { "name": "meta.tag.template.usebean.jsp", "begin": "(\u003c/?)(jsp:useBean)\\b", "end": "/?\u003e", "patterns": [ { "match": "(id|scope|class|type|beanName)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } } ] }, "directive": { "name": "meta.tag.template.$3.jsp", "begin": "(\u003c)(jsp:directive\\.(?=(attribute|include|page|tag|variable)\\s))", "end": "/\u003e", "patterns": [ { "begin": "\\G(attribute)(?=\\s)", "end": "(?=/\u003e)", "patterns": [ { "match": "(name|required|fragment|rtexprvalue|type|description)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } }, { "begin": "\\G(include)(?=\\s)", "end": "(?=/\u003e)", "patterns": [ { "match": "(file)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } }, { "begin": "\\G(page)(?=\\s)", "end": "(?=/\u003e)", "patterns": [ { "match": "(language|extends|import|session|buffer|autoFlush|isThreadSafe|info|errorPage|isErrorPage|contentType|pageEncoding|isElIgnored)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } }, { "begin": "\\G(tag)(?=\\s)", "end": "(?=/\u003e)", "patterns": [ { "match": "(display-name|body-content|dynamic-attributes|small-icon|large-icon|description|example|language|import|pageEncoding|isELIgnored)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } }, { "begin": "\\G(variable)(?=\\s)", "end": "(?=/\u003e)", "patterns": [ { "match": "(name-given|alias|variable-class|declare|scope|description)(=)((\")[^\"]*(\"))", "captures": { "1": { "name": "entity.other.attribute-name.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "3": { "name": "string.quoted.double.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } } }, "embedded": { "name": "meta.embedded.block.jsp", "contentName": "source.java", "begin": "(\u003c)(jsp:(declaration|expression|scriptlet))(\u003e)", "end": "((\u003c)/)(jsp:\\3)(\u003e)", "patterns": [ { "include": "source.java" } ], "beginCaptures": { "0": { "name": "meta.tag.template.$3.jsp" }, "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" }, "4": { "name": "punctuation.definition.tag.end.jsp" } }, "endCaptures": { "0": { "name": "meta.tag.template.$4.jsp" }, "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "source.java" }, "3": { "name": "entity.name.tag.jsp" }, "4": { "name": "punctuation.definition.tag.end.jsp" } } } } } }, "injections": { "text.html.jsp - (meta.embedded.block.jsp | meta.embedded.line.jsp | meta.tag | comment), meta.tag string.quoted": { "patterns": [ { "include": "#comment" }, { "include": "#declaration" }, { "include": "#expression" }, { "include": "#el_expression" }, { "include": "#tags" }, { "begin": "(^\\s*)(?=\u003c%(?=\\s))", "end": "(?!\\G)(\\s*$\\n)?", "patterns": [ { "include": "#scriptlet" } ], "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.erb" } }, "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.erb" } } }, { "include": "#scriptlet" } ] } } }