Skip to content

Instantly share code, notes, and snippets.

@qrg
Created November 19, 2014 12:52
Show Gist options
  • Save qrg/64192dc80571a094a2de to your computer and use it in GitHub Desktop.
Save qrg/64192dc80571a094a2de to your computer and use it in GitHub Desktop.
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: JIRA Syntax
scopeName: text.jira-syntax-tmlanguage
fileTypes: []
uuid: d16334ef-4dd6-4b0d-bf17-2c06f48c1b9d
patterns:
- match: ^h[1-6][ ].*$
name: markup.heading.headings.jira-syntax-tmlanguage
comment: hadings
- match: ^h1\.[ ].*$
name: markup.heading.1.jira-syntax-tmlanguage
comment: h1
- match: ^h2\.[ ].*$
name: markup.heading.2.jira-syntax-tmlanguage
comment: h2
- match: ^h3\.[ ].*$
name: markup.heading.3.jira-syntax-tmlanguage
comment: h3
- match: ^h4\.[ ].*$
name: markup.heading.4.jira-syntax-tmlanguage
comment: h4
- match: ^h5\.[ ].*$
name: markup.heading.5.jira-syntax-tmlanguage
comment: h5
- match: ^h6\.[ ].*$
name: markup.heading.6.jira-syntax-tmlanguage
comment: h6
- match: \s(\*)(.+?)(\*)\s
captures:
'1':
name: meta.code.jira-syntax-tmlanguage
'2':
name: markup.bold.jira-syntax-tmlanguage
'3':
name: meta.code.jira-syntax-tmlanguage
comment: strong
- match: (\[)(.+?)(\|)(.+?)(\])
captures:
'1':
name: meta.code.jira-syntax-tmlanguage
'2':
name: markup.anchor.external.alias.jira-syntax-tmlanguage
'3':
name: meta.code.jira-syntax-tmlanguage
'4':
name: markup.anchor.external.uri.jira-syntax-tmlanguage
'5':
name: meta.code.jira-syntax-tmlanguage
comment: anchor external URI
- match: ^\*+[ ]
name: markup.list.unordered.mark.jira-syntax-tmlanguage
comment: ul li
- match: ^#+[ ]
name: markup.list.ordered.mark.jira-syntax-tmlanguage
comment: ol li
- name: markup.raw.jira-syntax-tmlanguage
match: (\{{2})(.+?)[^\\](\}{2})
captures:
'1':
name: meta.code.jira-syntax-tmlanguage
'2':
name: markup.raw.jira-syntax-tmlanguage
'3':
name: meta.code.jira-syntax-tmlanguage
comment: code inline / {{...}}
- name: markup.raw.code.jira-syntax-tmlanguage
begin: (\{code[:|]*.*?\})
beginCaptures:
'1':
name: meta.code.jira-syntax-tmlanguage
end: (\{code\})
endCaptures:
'1':
name: meta.code.jira-syntax-tmlanguage
comment: code block / {code} ... {code}
...
@qrg
Copy link
Author

qrg commented Nov 19, 2014

あと色とかの設定を利用してる *.tmTheme ファイルに追記する

        <!--
            JIRA Syntax
        -->
        <dict>
            <key>name</key>
            <string>markup.bold</string>
            <key>scope</key>
            <string>markup.bold</string>
            <key>settings</key>
            <dict>
                <key>fontStyle</key>
                <string>bold</string>
                <key>foreground</key>
                <string>#FFFFFF</string>
            </dict>
        </dict>

        <dict>
            <key>name</key>
            <string>meta.code.jira-syntax-tmlanguage</string>
            <key>scope</key>
            <string>meta.code.jira-syntax-tmlanguage</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#777</string>
            </dict>
        </dict>

        <dict>
            <key>name</key>
            <string>markup.list.unordered.mark.jira-syntax-tmlanguage</string>
            <key>scope</key>
            <string>markup.list.unordered.mark.jira-syntax-tmlanguage</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#FF73B4</string>
            </dict>
        </dict>

        <dict>
            <key>name</key>
            <string>markup.list.ordered.mark.jira-syntax-tmlanguage</string>
            <key>scope</key>
            <string>markup.list.ordered.mark.jira-syntax-tmlanguage</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#FF73B4</string>
            </dict>
        </dict>

        <dict>
            <key>name</key>
            <string>markup.anchor.external.alias.jira-syntax-tmlanguage</string>
            <key>scope</key>
            <string>markup.anchor.external.alias.jira-syntax-tmlanguage</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#4FD0FF</string>
            </dict>
        </dict>

        <dict>
            <key>name</key>
            <string>markup.anchor.external.uri.jira-syntax-tmlanguage</string>
            <key>scope</key>
            <string>markup.anchor.external.uri.jira-syntax-tmlanguage</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#9AD5E9</string>
            </dict>
        </dict>

@qrg
Copy link
Author

qrg commented Nov 19, 2014

AAAPackageDev plugin
-> New YAML Syntax Definition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment