diff --git a/.gitmodules b/.gitmodules index 73029e34..d4ae5db2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -597,6 +597,21 @@ [submodule "vendor/grammars/InnoSetup"] path = vendor/grammars/InnoSetup url = https://github.com/idleberg/InnoSetup-Sublime-Text +[submodule "vendor/grammars/gap-tmbundle"] + path = vendor/grammars/gap-tmbundle + url = https://github.com/dhowden/gap-tmbundle +[submodule "vendor/grammars/SublimePapyrus"] + path = vendor/grammars/SublimePapyrus + url = https://github.com/Kapiainen/SublimePapyrus +[submodule "vendor/grammars/sublime-spintools"] + path = vendor/grammars/sublime-spintools + url = https://github.com/bitbased/sublime-spintools +[submodule "vendor/grammars/PogoScript.tmbundle"] + path = vendor/grammars/PogoScript.tmbundle + url = https://github.com/featurist/PogoScript.tmbundle +[submodule "vendor/grammars/sublime-opal"] + path = vendor/grammars/sublime-opal + url = https://github.com/artifactz/sublime-opal [submodule "vendor/grammars/mediawiki.tmbundle"] path = vendor/grammars/mediawiki.tmbundle url = https://github.com/textmate/mediawiki.tmbundle diff --git a/grammars.yml b/grammars.yml index b4a9c6e7..e1a1ce90 100644 --- a/grammars.yml +++ b/grammars.yml @@ -72,6 +72,8 @@ vendor/grammars/NimLime: - source.nimcfg vendor/grammars/PHP-Twig.tmbundle: - text.html.twig +vendor/grammars/PogoScript.tmbundle/: +- source.pogoscript vendor/grammars/RDoc.tmbundle: - text.rdoc vendor/grammars/Racket: @@ -112,6 +114,10 @@ vendor/grammars/Sublime-VimL: - source.viml vendor/grammars/SublimeBrainfuck: - source.bf +vendor/grammars/SublimePapyrus/: +- source.compiled-papyrus +- source.papyrus +- source.papyrus-assembly vendor/grammars/SublimeXtend: - source.xtend vendor/grammars/TXL/: @@ -225,6 +231,8 @@ vendor/grammars/fortran.tmbundle: - source.fortran.modern vendor/grammars/fsharpbinding: - source.fsharp +vendor/grammars/gap-tmbundle/: +- source.gap vendor/grammars/gettext.tmbundle: - source.po vendor/grammars/gnuplot-tmbundle: @@ -455,12 +463,18 @@ vendor/grammars/sublime-nginx: - source.nginx vendor/grammars/sublime-nix: - source.nix +vendor/grammars/sublime-opal/: +- source.opal +- source.opalsysdefs vendor/grammars/sublime-robot-plugin: - text.robot vendor/grammars/sublime-rust: - source.rust vendor/grammars/sublime-sourcepawn: - source.sp +vendor/grammars/sublime-spintools/: +- source.regexp.spin +- source.spin vendor/grammars/sublime-tea: - source.tea vendor/grammars/sublime-text-ox/: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9b197fd3..c02ebfea 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -961,7 +961,7 @@ GAP: - .gd - .gi - .tst - tm_scope: none + tm_scope: source.gap ace_mode: text GAS: @@ -2052,7 +2052,7 @@ Opal: color: "#f7ede0" extensions: - .opal - tm_scope: none + tm_scope: source.opal ace_mode: text OpenCL: @@ -2158,7 +2158,7 @@ Papyrus: color: "#6600cc" extensions: - .psc - tm_scope: none + tm_scope: source.papyrus ace_mode: text Parrot: @@ -2276,7 +2276,7 @@ PogoScript: color: "#d80074" extensions: - .pogo - tm_scope: none + tm_scope: source.pogoscript ace_mode: text PostScript: @@ -2323,7 +2323,7 @@ Propeller Spin: color: "#2b446d" extensions: - .spin - tm_scope: none + tm_scope: source.spin ace_mode: text Protocol Buffer: diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 188bc187..18cbce28 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -3,12 +3,18 @@ require_relative "./helper" class TestGrammars < Minitest::Test ROOT = File.expand_path("../..", __FILE__) - # These grammars have no license but have been grandfathered in. New grammars - # must have a license that allows redistribution. - UNLICENSED_GRAMMARS_WHITELIST = %w[ - vendor/grammars/Sublime-Lasso - vendor/grammars/Sublime-REBOL - vendor/grammars/x86-assembly-textmate-bundle + LICENSE_WHITELIST = [ + # This grammar's MIT license is inside a subdirectory. + "vendor/grammars/SublimePapyrus", + + # This grammar has a nonstandard but acceptable license. + "vendor/grammars/gap-tmbundle", + + # These grammars have no license but have been grandfathered in. New grammars + # must have a license that allows redistribution. + "vendor/grammars/Sublime-Lasso", + "vendor/grammars/Sublime-REBOL", + "vendor/grammars/x86-assembly-textmate-bundle", ].freeze def setup @@ -77,9 +83,9 @@ class TestGrammars < Minitest::Test unlicensed = categories[:unlicensed] || [] unrecognized = categories[:unrecognized] || [] - disallowed_unlicensed = unlicensed - UNLICENSED_GRAMMARS_WHITELIST - disallowed_unrecognized = unrecognized - UNLICENSED_GRAMMARS_WHITELIST - extra_whitelist_entries = UNLICENSED_GRAMMARS_WHITELIST - (unlicensed | unrecognized) + disallowed_unlicensed = unlicensed - LICENSE_WHITELIST + disallowed_unrecognized = unrecognized - LICENSE_WHITELIST + extra_whitelist_entries = LICENSE_WHITELIST - (unlicensed | unrecognized) message = "" if disallowed_unlicensed.any? @@ -93,7 +99,7 @@ class TestGrammars < Minitest::Test end if extra_whitelist_entries.any? message << "\n\n" unless message.empty? - message << "The following grammar submodules are listed in UNLICENSED_GRAMMARS_WHITELIST but either have a license (yay!)\n" + message << "The following grammar submodules are listed in LICENSE_WHITELIST but either have a license (yay!)\n" message << "or have been removed from the repository. Please remove them from the whitelist.\n" message << extra_whitelist_entries.sort.join("\n") end @@ -131,6 +137,8 @@ class TestGrammars < Minitest::Test "unlicense" elsif content.include?("http://www.wtfpl.net/txt/copying/") "WTFPL" + elsif content.include?("zlib") && content.include?("license") && content.include?("2. Altered source versions must be plainly marked as such") + "zlib" end end end diff --git a/vendor/grammars/PogoScript.tmbundle b/vendor/grammars/PogoScript.tmbundle new file mode 160000 index 00000000..2255586f --- /dev/null +++ b/vendor/grammars/PogoScript.tmbundle @@ -0,0 +1 @@ +Subproject commit 2255586f9ec69bab052b2250615db9b824774178 diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus new file mode 160000 index 00000000..5a7b3e7b --- /dev/null +++ b/vendor/grammars/SublimePapyrus @@ -0,0 +1 @@ +Subproject commit 5a7b3e7b29fdee835d0198d1f20e21c0ff874154 diff --git a/vendor/grammars/gap-tmbundle b/vendor/grammars/gap-tmbundle new file mode 160000 index 00000000..291a0469 --- /dev/null +++ b/vendor/grammars/gap-tmbundle @@ -0,0 +1 @@ +Subproject commit 291a0469dd4eb7082b08e828edc8bf0cfbb9b599 diff --git a/vendor/grammars/sublime-opal b/vendor/grammars/sublime-opal new file mode 160000 index 00000000..55ae90b9 --- /dev/null +++ b/vendor/grammars/sublime-opal @@ -0,0 +1 @@ +Subproject commit 55ae90b910933889d01c55766424db5b3e10332e diff --git a/vendor/grammars/sublime-spintools b/vendor/grammars/sublime-spintools new file mode 160000 index 00000000..56d326a4 --- /dev/null +++ b/vendor/grammars/sublime-spintools @@ -0,0 +1 @@ +Subproject commit 56d326a44ec0be0f301d5fb1d9e1ada9944554bb