mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-05 14:40:20 +09:00
Use new syntax highlighting engine from zyedidia/highlight
This changes all the syntax files in the runtime directory and also changes how syntax highlighting is done from inside micro.
This commit is contained in:
30
runtime/syntax/git-commit.yaml
Normal file
30
runtime/syntax/git-commit.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
filetype: git-commit
|
||||
|
||||
detect:
|
||||
filename: "COMMIT_EDITMSG|TAG_EDITMSG"
|
||||
|
||||
rules:
|
||||
# Commit message
|
||||
- ignore: ".*"
|
||||
# Comments
|
||||
- comment:
|
||||
start: "#"
|
||||
end: "$"
|
||||
rules: []
|
||||
# File changes
|
||||
- keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
|
||||
- keyword: "#[[:space:]]deleted:"
|
||||
- keyword: "#[[:space:]]modified:"
|
||||
- keyword: "#[[:space:]]new file:"
|
||||
- keyword: "#[[:space:]]renamed:"
|
||||
# Untracked filenames
|
||||
- error: "^# [^/?*:;{}\\\\]+\\.[^/?*:;{}\\\\]+$"
|
||||
- keyword: "^#[[:space:]]Changes.*[:]"
|
||||
- keyword: "^#[[:space:]]Your branch and '[^']+"
|
||||
- keyword: "^#[[:space:]]Your branch and '"
|
||||
- keyword: "^#[[:space:]]On branch [^ ]+"
|
||||
- keyword: "^#[[:space:]]On branch"
|
||||
# Recolor hash symbols
|
||||
- special: "#"
|
||||
# Trailing spaces (+LINT is not ok, git uses tabs)
|
||||
- error: "[[:space:]]+$"
|
||||
Reference in New Issue
Block a user