From e472d7b8b1bd5ad517dca04db930f2efc70d5e4d Mon Sep 17 00:00:00 2001 From: Karel Brinda Date: Fri, 5 Dec 2014 20:00:52 +0100 Subject: [PATCH 1/6] Python syntax highlighting for Snakemake files --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 09144d98..ef8b5ab9 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2321,6 +2321,7 @@ Python: - SConscript - SConstruct - wscript + - Snakemake interpreters: - python - python2 From d10d328eb1031281cd8e1b84edabf6e865d43663 Mon Sep 17 00:00:00 2001 From: Alex Kit Date: Fri, 5 Dec 2014 21:15:07 +0100 Subject: [PATCH 2/6] MaskLang: Use proper tm scope --- grammars.yml | 2 ++ lib/linguist/languages.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/grammars.yml b/grammars.yml index 1bedce80..ae0245e4 100644 --- a/grammars.yml +++ b/grammars.yml @@ -420,3 +420,5 @@ https://github.com/wmertens/sublime-nix: - source.nix https://raw.githubusercontent.com/eregon/oz-tmbundle/master/Syntaxes/Oz.tmLanguage: - source.oz +https://raw.githubusercontent.com/tenbits/sublime-mask/release/Syntaxes/mask.tmLanguage: +- source.mask \ No newline at end of file diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 09144d98..4bd743e4 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1719,7 +1719,7 @@ Mask: ace_mode: mask extensions: - .mask - tm_scope: source.scss + tm_scope: source.mask Mathematica: type: programming From d118017d279f73e0fad5195bc99154638a1076a1 Mon Sep 17 00:00:00 2001 From: Karel Brinda Date: Fri, 5 Dec 2014 23:36:25 +0100 Subject: [PATCH 3/6] Correction of alphabet sorting of filenames --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ef8b5ab9..4f2588cf 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2320,8 +2320,8 @@ Python: - BUILD - SConscript - SConstruct - - wscript - Snakemake + - wscript interpreters: - python - python2 From d002dfa70cd1cc000ce0cedaa8e46d3c4d92198a Mon Sep 17 00:00:00 2001 From: Karel Brinda Date: Fri, 5 Dec 2014 23:46:37 +0100 Subject: [PATCH 4/6] Snakemake => Snakefile (Snakemake ... program, Snakefile ... file) --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4f2588cf..6306f0f6 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2320,7 +2320,7 @@ Python: - BUILD - SConscript - SConstruct - - Snakemake + - Snakefile - wscript interpreters: - python From 1488796779283900c8f0e6c6c8f580a600a77f11 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sat, 6 Dec 2014 15:41:13 -0500 Subject: [PATCH 5/6] .ts as a XML extension for Qt translation files --- lib/linguist/languages.yml | 1 + samples/XML/pt_BR.ts | 47 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 samples/XML/pt_BR.ts diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 09144d98..cb7cf622 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3066,6 +3066,7 @@ XML: - .tmSnippet - .tmTheme - .tml + - .ts - .ui - .urdf - .vbproj diff --git a/samples/XML/pt_BR.ts b/samples/XML/pt_BR.ts new file mode 100644 index 00000000..bfaf0015 --- /dev/null +++ b/samples/XML/pt_BR.ts @@ -0,0 +1,47 @@ + + + + + MainWindow + + + United Kingdom + Reino Unido + + + + God save the Queen + Deus salve a Rainha + + + + England + Inglaterra + + + + Wales + Gales + + + + Scotland + Escócia + + + + Northern Ireland + Irlanda Norte + + + + Portuguese + Português + + + + English + Inglês + + + From 583392d1794a4c55776a1fbb86c34cc3d25d4b2b Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sat, 6 Dec 2014 16:31:14 -0500 Subject: [PATCH 6/6] Heuristic for .ts (TypeScript, XML) --- lib/linguist/heuristics.rb | 8 ++++++++ test/test_heuristics.rb | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 0d0b8338..69dcb395 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -165,5 +165,13 @@ module Linguist Language["text"] end end + + disambiguate "TypeScript", "XML" do |data| + if data.include?(" "LoomScript/HelloWorld.ls" }) end + + def test_ts_by_heuristics + assert_heuristics({ + "TypeScript" => all_fixtures("TypeScript", "*.ts"), + "XML" => all_fixtures("XML", "*.ts") + }) + end end