forked from sublimehq/Packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Git Formats] highlight diffs in Git Log syntax for
git show
(subli…
…mehq#2989) * [Git Formats] highlight diffs in Git Log syntax for `git show` * [Git Formats] Improvements to Git Log from PR review * [Git Formats] Scope the extended patch headers in Git Log syntax * [Git Formats] use variables for escape patterns in Git Log syntax * [Git Formats] apply a meta scope to the extended diff headers in Git Log * [Git Formats] Rework Git Link syntax to avoid meta.mapping.value scope when referencing the path context from another syntax * [Git Formats] Remove .link scope suffix from generic path scopes in Git Link syntax * [Git Formats] Remove erroneous dot from Git Link path terminator punctuation * [Git Formats] remove unnecessary punctuation.terminator scope at EOL
- Loading branch information
1 parent
37be46b
commit ca0a9a2
Showing
4 changed files
with
196 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,58 @@ | ||
# SYNTAX TEST "Git Link.sublime-syntax" | ||
# <- text.git.link comment.line punctuation.definition.comment | ||
gitdir: c:/data/sublime/packages/.git. | ||
gitdir: c:/data/sublime/packages/.git | ||
#^^^^^ meta.mapping.key.git.link - meta.mapping.value.git.link | ||
# ^ meta.mapping.git.link - meta.mapping.key.git.link - meta.mapping.value.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.git.link - meta.mapping.key.git.link | ||
# ^ - string.unquoted.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.git.link | ||
# ^ punctuation.separator.drive.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ - string.unquoted.git.link | ||
# ^ punctuation.terminator.path.git.link | ||
gitdir: c:\data\sublime\packages\.git. | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.git.link - meta.mapping.key.git.link | ||
# ^ - string.unquoted.git | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.git | ||
# ^ punctuation.separator.drive.git | ||
# ^ punctuation.separator.path.git | ||
# ^ punctuation.separator.path.git | ||
# ^ punctuation.separator.path.git | ||
# ^ - string.unquoted.git | ||
gitdir: c:\data\sublime\packages\.git | ||
#^^^^^ meta.mapping.key.git.link - meta.mapping.value.git.link | ||
# ^ meta.mapping.git.link - meta.mapping.key.git.link - meta.mapping.value.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.git.link - meta.mapping.key.git.link | ||
# ^ - string.unquoted.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.git.link | ||
# ^ punctuation.separator.drive.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ - string.unquoted.git.link | ||
# ^ punctuation.terminator.path.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.git.link - meta.mapping.key.git.link | ||
# ^ - string.unquoted.git | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.git | ||
# ^ punctuation.separator.drive.git | ||
# ^ punctuation.separator.path.git | ||
# ^ punctuation.separator.path.git | ||
# ^ - string.unquoted.git | ||
gitdir: ~/../sub..li~me/./packages/.git | ||
#^^^^^ meta.mapping.key.git.link - meta.mapping.value.git.link | ||
# ^ meta.mapping.git.link - meta.mapping.key.git.link - meta.mapping.value.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.git.link - meta.mapping.key.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.git.link - meta.mapping.key.git.link | ||
# <- keyword.other.gitdir.git.link | ||
#^^^^^ keyword.other.gitdir.git.link | ||
# ^ punctuation.separator.mapping.key-value.git.link | ||
# ^ - string.unquoted.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.git.link | ||
# ^ - string.unquoted.git.link | ||
# ^ variable.language.environment.home.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^^ constant.language.path.parent.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^^ - constant.language.path.parent.git.link | ||
# ^ - variable.language.environment.home.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ constant.language.path.self.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ - constant.language.path.self.git.link | ||
gitdir invalid : ../data/s?bl*me/packages/.git. | ||
# ^ - string.unquoted.git | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.git | ||
# ^ - string.unquoted.git | ||
# ^ variable.language.environment.home.git | ||
# ^ punctuation.separator.path.git | ||
# ^^ constant.language.path.parent.git | ||
# ^ punctuation.separator.path.git | ||
# ^^ - constant.language.path.parent.git | ||
# ^ - variable.language.environment.home.git | ||
# ^ punctuation.separator.path.git | ||
# ^ constant.language.path.self.git | ||
# ^ punctuation.separator.path.git | ||
# ^ - constant.language.path.self.git | ||
gitdir invalid : ../data/s?bl*me/packages/.git | ||
#^^^^^^^^^^^^^^ meta.mapping.key.git.link - meta.mapping.value.git.link | ||
# ^ meta.mapping.git.link - meta.mapping.key.git.link - meta.mapping.value.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.git.link - meta.mapping.key.git.link | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.git.link - meta.mapping.key.git.link | ||
# <- keyword.other.gitdir.git.link | ||
#^^^^^ keyword.other.gitdir.git.link | ||
# ^^^^^^^ invalid.illegal.separator-expected.git.link | ||
# ^ punctuation.separator.mapping.key-value.git.link | ||
# ^^ constant.language.path.parent.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ invalid.illegal.path.git.link | ||
# ^ invalid.illegal.path.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ punctuation.separator.path.git.link | ||
# ^ punctuation.terminator.path.git.link | ||
# ^^ constant.language.path.parent.git | ||
# ^ punctuation.separator.path.git | ||
# ^ punctuation.separator.path.git | ||
# ^ invalid.illegal.path.git | ||
# ^ invalid.illegal.path.git | ||
# ^ punctuation.separator.path.git | ||
# ^ punctuation.separator.path.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,3 +74,86 @@ Date: Thu Sep 21 22:53:04 2017 +0200 | |
#^^^ keyword.other.header.git.log | ||
# ^ punctuation.separator.mapping.pair.git.log - keyword.other.header.git.log | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.log | ||
|
||
commit 344d003a330e244cc507d17c2f224bb295013511 (HEAD -> git_show, sublimehq/master, master) | ||
Author: Thomas Smith <[email protected]> | ||
Date: Tue Aug 24 13:44:17 2021 -0400 | ||
|
||
[TypeScript] [TSX] Fix arrow function type parameter tests for TSX. (#2987) | ||
|
||
diff --git a/JavaScript/TypeScript.sublime-syntax b/JavaScript/TypeScript.sublime-syntax | ||
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.shell | ||
# ^ - source.shell | ||
#^^^ source.shell meta.function-call.identifier variable.function | ||
# ^^ punctuation.definition.parameter | ||
# ^^^ variable.parameter.option | ||
index ae1b1061..c1a585d0 100644 | ||
--- a/JavaScript/TypeScript.sublime-syntax | ||
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.diff meta.diff.header meta.header.from-file | ||
+++ b/JavaScript/TypeScript.sublime-syntax | ||
@@ -551,26 +551,6 @@ contexts: | ||
scope: keyword.operator.comparison.js | ||
set: expression-begin | ||
|
||
- # expression-begin: | ||
- # - meta_prepend: true | ||
- # - match: (?=\<(?!<)) | ||
- # pop: true | ||
- # branch_point: ts-old-type-assertion | ||
- # branch: | ||
- # - ts-old-type-assertion | ||
diff --git a/JavaScript/tests/syntax_test_typescript_not_tsx.ts b/JavaScript/tests/syntax_test_typescript_not_tsx.ts | ||
#^^^ source.shell meta.function-call.identifier variable.function | ||
index c90bfab4,c90bfab4..e9338c70 100644 | ||
#^^^^ keyword.context.git.log | ||
# ^^^^^^^^ constant.other.hash | ||
# ^ punctuation.separator.sequence.git.log | ||
# ^^^^^^^^ constant.other.hash | ||
# ^^ punctuation.separator.sequence.git.log | ||
# ^^^^^^^^ constant.other.hash | ||
# ^^^^^^ meta.number.integer.octal.git constant.numeric.value.git.log | ||
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.diff.header.extended.git.log | ||
mode 012345,676543..701532 | ||
#^^^ keyword.context.git.log | ||
# ^^^^^^ meta.number.integer.octal.git constant.numeric.value.git.log | ||
# ^ punctuation.separator.sequence.git.log | ||
# ^^^^^^ meta.number.integer.octal.git constant.numeric.value.git.log | ||
# ^^ punctuation.separator.sequence.git.log | ||
# ^^^^^^ meta.number.integer.octal.git constant.numeric.value.git.log | ||
new file mode 012345 | ||
#^^^^^^^^^^^^ keyword.context.git.log | ||
# ^^^^^^ meta.number.integer.octal.git constant.numeric.value.git.log | ||
deleted file mode 012345,676543 | ||
#^^^^^^^^^^^^^^^^ keyword.context.git.log | ||
# ^^^^^^ meta.number.integer.octal.git constant.numeric.value.git.log | ||
# ^ punctuation.separator.sequence.git.log | ||
# ^^^^^^ meta.number.integer.octal.git constant.numeric.value.git.log | ||
similarity index 983489374 | ||
#^^^^^^^^^^^^^^^ keyword.context.git.log | ||
# ^^^^^^^^^ meta.number.integer.decimal.git constant.numeric.value.git.log | ||
dissimilarity index 72637263 | ||
#^^^^^^^^^^^^^^^^^^ keyword.context.git.log | ||
# ^^^^^^^^ meta.number.integer.decimal.git constant.numeric.value.git.log | ||
copy from JavaScript/tests/syntax_test_typescript_not_tsx.ts | ||
#^^^^^^^^ keyword.context.git.log | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.path.git string.unquoted.git | ||
move to JavaScript/tests/syntax_test_typescript_not_tsx.ts | ||
#^^^^^^ keyword.context.git.log | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.path.git string.unquoted.git | ||
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.diff.header.extended.git.log | ||
--- a/JavaScript/tests/syntax_test_typescript_not_tsx.ts | ||
#<- - meta.diff.header.extended | ||
+++ b/JavaScript/tests/syntax_test_typescript_not_tsx.ts | ||
#^^ source.diff meta.diff.header meta.header.to-file punctuation.definition.to-file | ||
@@ -25,3 +25,12 @@ | ||
let strLength: number = (<string>someValue).length; // </string> | ||
// ^^^^^^^^ meta.assertion - meta.tag | ||
// ^^^^^^^^^ comment - meta.tag | ||
+ | ||
+ <T>() => {}; | ||
+// ^^^^^^^^^^^ meta.function | ||
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.diff markup.inserted | ||
|
||
commit e2077c6e006acfd2f060aef03c4ef8f89c4db362 (HEAD -> main, origin/main) | ||
#^^^^^ meta.header.git.commit markup.raw.block.git keyword.other.commit.git - source.diff | ||
# ^^^^ entity.other.branch-name.master.git.log |