Skip to content

Commit

Permalink
fix: point to correct location of textmate grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
SKalt committed Mar 31, 2024
1 parent 14f564c commit d2130d2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion editors/code/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{
"language": "git-commit",
"scopeName": "source.git-commit",
"path": "./src/tmLanguage.json"
"path": "./dist/tmLanguage.json"
}
],
"configuration": {
Expand Down
16 changes: 16 additions & 0 deletions editors/code/base/src/tmLanguage.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# © Steven Kalt
# SPDX-License-Identifier: APACHE-2.0
# yaml-language-server: $schema=https://raw.githubusercontent.com/Septh/tmlanguage/master/tmlanguage.json
# See https://macromates.com/manual/en/language_grammars
# See https://github.com/microsoft/vscode/blob/main/extensions/git-base/syntaxes/git-commit.tmLanguage.json
scopeName: source.git-commit
patterns:
# available scopes that are probably themed in vscode:
Expand Down Expand Up @@ -55,6 +57,20 @@ patterns:
begin: "\\A" # beginning of the string -- see _
end: "$"

- "comment": "diff presented at the end of the commit message when using commit -v."
"name": "meta.embedded.diff.git-commit"
"contentName": "source.diff"
"begin": "(?=^diff\\ \\-\\-git)"
"end": "\\z"
"patterns": [{ "include": "source.diff" }]
# see https://git-scm.com/docs/git-commit#Documentation/git-commit.txt-scissors
# see https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---verbose

# - name: ???
# begin: "^# ?----+ ?>8 ?----+"
# comment: "scissors"
# end: "$"

- name: comment
begin: "^#"
end: "$"
Expand Down

0 comments on commit d2130d2

Please sign in to comment.