diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9f813eed..4d33b31d 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1623,9 +1623,11 @@ JSON: extensions: - .json - .geojson + - .JSON-tmLanguage - .lock - .topojson filenames: + - .arcconfig - .jshintrc - composer.lock - mcmod.info @@ -2082,6 +2084,7 @@ Makefile: - .mk - .mkfile filenames: + - BSDmakefile - GNUmakefile - Kbuild - Makefile diff --git a/samples/JSON/Git Commit.JSON-tmLanguage b/samples/JSON/Git Commit.JSON-tmLanguage new file mode 100644 index 00000000..724e4e9b --- /dev/null +++ b/samples/JSON/Git Commit.JSON-tmLanguage @@ -0,0 +1,123 @@ +{ + "name": "Git Commit Message", + "scopeName": "text.git-commit", + "fileTypes": [ + "COMMIT_EDITMSG" + ], + "patterns": [ + { + "name": "comment.line.number-sign.git-commit-message", + "begin": "^#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.git-commit-message" + } + }, + "end": "$", + "patterns": [ + { + "name": "comment.line.on-branch.git-commit-message", + "match": "(?:On branch )([^ ]+)", + "captures": { + "1": { + "name": "support.function.branch.git-commit-message" + } + } + }, + { + "name": "comment.line.on-branch.git-commit-message", + "match": "Your branch .* '([^ ']+)'", + "captures": { + "1": { + "name": "support.function.branch.git-commit-message" + } + } + }, + { + "name": "comment.line.untracked.git-commit-message", + "begin": " Untracked files:", + "beginCaptures": { + "0": { + "name": "entity.definition.untracked.git-commit-message" + } + }, + "end": "^#$", + "patterns": [ + { + "name": "comment.line.untracked-file.git-commit-message", + "match": "\t(.*)$", + "captures": { + "1": { + "name": "support.function.file-status.git-commit-message" + }, + "2": { + "name": "constant.character.branch.git-commit-message" + } + } + } + ] + }, + { + "name": "comment.line.discarded.git-commit-message", + "begin": " Change(?:s not staged for commit|d but not updated):", + "beginCaptures": { + "0": { + "name": "entity.definition.discarded.git-commit-message" + } + }, + "end": "^#$", + "patterns": [ + { + "name": "comment.line.discarded.git-commit-message", + "match": "\t([^:]+):(.*)$", + "captures": { + "1": { + "name": "support.function.file-status.git-commit-message" + }, + "2": { + "name": "constant.character.branch.git-commit-message" + } + } + } + ] + }, + { + "name": "comment.line.selected.git-commit-message", + "begin": " Changes to be committed:", + "beginCaptures": { + "0": { + "name": "entity.definition.selected.git-commit-message" + } + }, + "end": "^#$", + "patterns": [ + { + "name": "comment.line.selected.git-commit-message", + "match": "\t([^:]+):(.*)$", + "captures": { + "1": { + "name": "support.function.file-status.git-commit-message" + }, + "2": { + "name": "constant.character.branch.git-commit-message" + } + } + } + ] + } + ] + }, + { + "name": "meta.diff.git-commit", + "comment": "diff at the end of the commit message when using commit -v, or viewing a log. End pattern is just something to be never matched so that the meta continues untill the end of the file.", + "begin": "diff\\ \\-\\-git", + "end": "(?=xxxxxx)123457", + "patterns": [ + { + "include": "source.diff" + } + ] + } + ], + "uuid": "de3fb2fc-e564-4a31-9813-5ee26967c5c8" +} diff --git a/samples/JSON/filenames/.arcconfig b/samples/JSON/filenames/.arcconfig new file mode 100644 index 00000000..14fe064b --- /dev/null +++ b/samples/JSON/filenames/.arcconfig @@ -0,0 +1,8 @@ +{ + "project_id": "example", + "conduit_uri": "https://ex.am.pl/", + "copyright_holder": "Apache Software Foundation", + "arcanist_configuration": "ArcJIRAConfiguration", + "phabricator.uri": "https://phabricator.example.com/", + "load": ["libs/src"] +} diff --git a/samples/Makefile/filenames/BSDmakefile b/samples/Makefile/filenames/BSDmakefile new file mode 100644 index 00000000..b2f36fa2 --- /dev/null +++ b/samples/Makefile/filenames/BSDmakefile @@ -0,0 +1,11 @@ +# pmake might add -J (private) +FLAGS=${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W} + +all: .DEFAULT +.DEFAULT: + @which gmake > /dev/null 2>&1 ||\ + (echo "GMake is required for node.js to build.\ + Install and try again" && exit 1) + @gmake ${.FLAGS} ${.TARGETS} + +.PHONY: test