]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/git-commit.yaml
Merge pull request #782 from i-amdroid/master
[micro.git] / runtime / syntax / git-commit.yaml
index dffec546abc452f9f4bb9616eb08ed5eb5a97acd..f2bf6b5b6a5624e1e33640115ab98b3be64a9f05 100644 (file)
@@ -1,20 +1,29 @@
 filetype: git-commit
 
-detect: 
+detect:
     filename: "COMMIT_EDITMSG|TAG_EDITMSG"
 
 rules:
+    # Commit message
     - ignore: ".*"
-    - comment: "^#.*"
-    - statement: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
-    - statement: "#[[:space:]]deleted:"
-    - statement: "#[[:space:]]modified:"
-    - statement: "#[[:space:]]new file:"
-    - statement: "#[[:space:]]renamed:"
+    # Comments
+    - comment:
+        start: "#"
+        end: "$"
+        rules: []
+    # File changes
+    - type.keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
+    - type.keyword: "#[[:space:]]deleted:"
+    - type.keyword: "#[[:space:]]modified:"
+    - type.keyword: "#[[:space:]]new file:"
+    - type.keyword: "#[[:space:]]renamed:"
+    # Untracked filenames
     - error: "^#       [^/?*:;{}\\\\]+\\.[^/?*:;{}\\\\]+$"
-    - statement: "^#[[:space:]]Changes.*[:]"
-    - statement: "^#[[:space:]]Your branch and '[^']+"
-    - statement: "^#[[:space:]]Your branch and '"
-    - statement: "^#[[:space:]]On branch [^ ]+"
-    - statement: "^#[[:space:]]On branch"
+    - type.keyword: "^#[[:space:]]Changes.*[:]"
+    - type.keyword: "^#[[:space:]]Your branch and '[^']+"
+    - type.keyword: "^#[[:space:]]Your branch and '"
+    - type.keyword: "^#[[:space:]]On branch [^ ]+"
+    - type.keyword: "^#[[:space:]]On branch"
+    # Recolor hash symbols
     - special: "#"
+