Skip to content

Commit

Permalink
Merge 0da240d into 6fe12fd
Browse files Browse the repository at this point in the history
  • Loading branch information
kaste committed Dec 21, 2018
2 parents 6fe12fd + 0da240d commit a2f4327
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
25 changes: 15 additions & 10 deletions syntax/graph.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,31 @@ name: GitSavvy Graph
file_extensions: []
hidden: true
scope: git-savvy.graph
variables:
sha: '[0-9a-f]{6,40}'
contexts:
main:
- match: (?=^.*{{sha}} +\(HEAD( ->|\)))
push:
- meta_scope: meta.graph.graph-line.head.git-savvy
- include: content
- match: $
pop: true

- include: content

content:
- match: '([| \\/_.-]+)'
comment: graph lines
scope: punctuation.other.git-savvy.graph.graph-line

- match: '[*●]'
scope: keyword.graph.commit.git-savvy

- match: \s*([0-9a-f]{6,40})\b
- match: \s*({{sha}})\b
comment: SHA
scope: constant.numeric.graph.commit-hash.git-savvy

- match: (?=\s*\(HEAD)
push:
- meta_scope: meta.graph.graph-line.head.git-savvy
- include: branch-name
- match: (?=\S)
push: message
- match: $
pop: true

- include: branch-name

- match: (?=\S)
Expand All @@ -51,6 +54,8 @@ contexts:
scope: punctuation.separator.other.git-savvy
- match: '->'
scope: punctuation.separator.key-value.branch.git-savvy
- match: HEAD
scope: constant.other.git.head.git-savvy
- match: ([^ ,)]+)
scope: constant.other.git.branch.git-savvy

Expand Down
13 changes: 9 additions & 4 deletions syntax/test/syntax_test_graph.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
* 2b17192 (HEAD -> develop, origin/master, origin/HEAD, master) replace all references to .tmLanguage to .sublime-syntax
# <- keyword.graph.commit
# ^ constant.numeric.graph.commit-hash
# ^ constant.other.git.branch
# ^^^^ constant.other.git.head
# ^ constant.other.git.branch
# ^ punctuation.separator.key-value.branch
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.graph.branch.git-savvy
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.graph.message.git-savvy
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.graph.graph-line.head.git-savvy
* f483ab7 update blame syntax format
* 6929182 update make_commit syntax format
# <- meta.graph.graph-line.head.git-savvy
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.graph.graph-line.head.git-savvy
* f483ab7 (HEAD) update blame syntax format
# <- meta.graph.graph-line.head.git-savvy
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.graph.graph-line.head.git-savvy
# ^^^^ constant.other.git.head
* 6929182 update (HEAD) make_commit syntax format
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ git-savvy.graph meta.graph.message.git-savvy
* ede734e update diff syntax format
# <- keyword.graph.commit
# ^ constant.numeric.graph.commit-hash
Expand Down

0 comments on commit a2f4327

Please sign in to comment.