--- name: Haml fileTypes: - haml - sass scopeName: text.haml repository: continuation: captures: '1': name: punctuation.separator.continuation.haml match: "(\\|)\\s*\\n" rubyline: name: meta.line.ruby.haml endCaptures: '1': name: source.ruby.embedded.html '2': name: keyword.control.ruby.start-block begin: "=|-|~" contentName: source.ruby.embedded.haml end: "((do|\\{)( \\|[^|]+\\|)?)$|$|^(?!.*\\|\\s*$)" patterns: - name: comment.line.number-sign.ruby match: "#.*$" comment: Hack to let ruby comments work in this context properly - include: source.ruby.rails - include: "#continuation" uuid: 3D727049-DD05-45DF-92A5-D50EA36FD035 foldingStartMarker: "^\\s*([-%#\\:\\.\\w\\=].*)\\s$" patterns: - name: meta.prolog.haml captures: '1': name: punctuation.definition.prolog.haml match: "^(!!!)($|\\s.*)" - name: comment.line.slash.haml captures: '1': name: punctuation.section.comment.haml match: "^ *(/)\\s*\\S.*$\\n?" - name: comment.block.haml begin: "^( *)(/)\\s*$" beginCaptures: '2': name: punctuation.section.comment.haml end: "^(?!\\1 )" patterns: - include: text.haml - captures: '1': name: meta.tag.haml '2': name: punctuation.definition.tag.haml '3': name: entity.name.tag.haml begin: "^\\s*(?:((%)([\\w:]+))|(?=\\.|#))" end: "$|(?!\\.|#|\\{|\\[|=|-|~|/)" patterns: - name: entity.name.tag.class.haml match: "\\.[\\w-]+" - name: entity.name.tag.id.haml match: "#[\\w-]+" - name: meta.section.attributes.haml begin: "\\{(?=.*\\}|.*\\|\\s*$)" end: "\\}|$|^(?!.*\\|\\s*$)" patterns: - include: source.ruby.rails - include: "#continuation" - name: meta.section.object.haml begin: "\\[(?=.*\\]|.*\\|\\s*$)" end: "\\]|$|^(?!.*\\|\\s*$)" patterns: - include: source.ruby.rails - include: "#continuation" - include: "#rubyline" - name: punctuation.terminator.tag.haml match: "/" - captures: '1': name: meta.escape.haml match: "^\\s*(\\\\.)" - begin: "^\\s*(?==|-|~)" end: "$" patterns: - include: "#rubyline" foldingStopMarker: "^\\s*$" keyEquivalent: "^~H"