<commit_before>scopeName: 'source.tikz'
name: 'LaTeX TikZ'
filetypes: [
    'tikz'
]

patterns: [
    {
        comment: 'Looks for begin/end tikzpicture. This env should be in the file, even if separate from the main document.'
        begin: '(\\\\)begin\\{tikzpicture\\}'
        beginCaptures:
            0:
                name: 'keyword.control.environment.tikzpicture.tikz'
        end: '(\\\\)end\\{tikzpicture\\}'
        endCaptures:
            0:
                name: 'keyword.control.environment.tikzpicture.tikz'
        patterns: [
            {
                include: '$base'
            }
        ]
    }
    {
        include: '#draw'
    }
]


repository:
    draw: {
        begin: '(\\\\)draw\\b'
        end: '\\;'
        name: 'support.function.general.tikz'
    }<commit_msg>Optional arguments for draw command<commit_after>scopeName: 'source.tikz'
name: '<NAME>'
filetypes: [
    'tikz'
]

patterns: [
    {
        comment: 'Looks for begin/end tikzpicture. This env should be in the file, even if separate from the main document.'
        begin: '(\\\\)begin\\{tikzpicture\\}'
        beginCaptures:
            0:
                name: 'keyword.control.environment.tikzpicture.tikz'
        end: '(\\\\)end\\{tikzpicture\\}'
        endCaptures:
            0:
                name: 'keyword.control.environment.tikzpicture.tikz'
        patterns: [
            {
                include: '$base'
            }
        ]
    }
    {
        include: '#draw'
    }
]


repository:
    draw: {
        begin: '(\\\\)draw\\b'
        end: '\\;'
        name: 'support.function.general.tikz'
        patterns: [
            {
                include: '#optionalArgumentScope'
            }
        ]
    }
    optionalArgumentScope: {
        comment: 'Matches options brackets and everything inside them.'
        contentName: 'variable.parameter.optional.latex'
        begin: '\\['
        beginCaptures:
            0:
                name: 'punctuation.definition.optional.begin.latex'
        end: '\\]'
        endCaptures:
            0:
                name: 'punctuation.definition.optional.end.latex'
        # patterns: [
        #     {
        #         comment: 'AFAIK, the optional parameters never have nested brackets. Will come back to this after a while or if I find they do.'
        #         include: '#commentMeta'
        #     }
        #     {
        #         include: '#escapedCurlyBracket'
        #     }
        #     {
        #         include: '#openCurlyBracketMeta'
        #     }
        # ]
    }
{'fraction_non_alphanumeric': 0.127435697583788, 'fraction_numerical': 0.002338269680436477, 'mean_word_length': 1.4171374764595104, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3468333', 'n_tokens_mistral': 760, 'n_tokens_neox': 728, 'n_words': 159}