github-linguist 2.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,8 @@ require 'escape_utils'
2
2
  require 'pygments'
3
3
  require 'yaml'
4
4
 
5
+ require 'linguist/samples'
6
+
5
7
  module Linguist
6
8
  # Language names that are recognizable by GitHub. Defined languages
7
9
  # can be highlighted, searched and listed under the Top Languages page.
@@ -26,13 +28,6 @@ module Linguist
26
28
  @overrides.include?(extension)
27
29
  end
28
30
 
29
- # Internal: Return overridden extensions.
30
- #
31
- # Returns extensions Array.
32
- def self.overridden_extensions
33
- @overrides.keys
34
- end
35
-
36
31
  # Internal: Create a new Language object
37
32
  #
38
33
  # attributes - A hash of attributes
@@ -244,7 +239,9 @@ module Linguist
244
239
  @overrides = attributes[:overrides] || []
245
240
  @filenames = attributes[:filenames] || []
246
241
 
247
- @primary_extension = attributes[:primary_extension] || default_primary_extension || extensions.first
242
+ unless @primary_extension = attributes[:primary_extension]
243
+ raise ArgumentError, "#{@name} is missing primary extension"
244
+ end
248
245
 
249
246
  # Prepend primary extension unless its already included
250
247
  if primary_extension && !extensions.include?(primary_extension)
@@ -381,13 +378,6 @@ module Linguist
381
378
  name.downcase.gsub(/\s/, '-')
382
379
  end
383
380
 
384
- # Internal: Get default primary extension.
385
- #
386
- # Returns the extension String.
387
- def default_primary_extension
388
- extensions.first
389
- end
390
-
391
381
  # Public: Get Language group
392
382
  #
393
383
  # Returns a Language
@@ -451,9 +441,34 @@ module Linguist
451
441
  end
452
442
  end
453
443
 
444
+ extensions = Samples::DATA['extnames']
445
+ filenames = Samples::DATA['filenames']
454
446
  popular = YAML.load_file(File.expand_path("../popular.yml", __FILE__))
455
447
 
456
448
  YAML.load_file(File.expand_path("../languages.yml", __FILE__)).each do |name, options|
449
+ options['extensions'] ||= []
450
+ options['filenames'] ||= []
451
+
452
+ if extnames = extensions[name]
453
+ extnames.each do |extname|
454
+ if !options['extensions'].include?(extname)
455
+ options['extensions'] << extname
456
+ else
457
+ warn "#{name} #{extname.inspect} is already defined in samples/. Remove from languages.yml."
458
+ end
459
+ end
460
+ end
461
+
462
+ if fns = filenames[name]
463
+ fns.each do |filename|
464
+ if !options['filenames'].include?(filename)
465
+ options['filenames'] << filename
466
+ else
467
+ warn "#{name} #{filename.inspect} is already defined in samples/. Remove from languages.yml."
468
+ end
469
+ end
470
+ end
471
+
457
472
  Language.create(
458
473
  :name => name,
459
474
  :color => options['color'],
@@ -464,7 +479,7 @@ module Linguist
464
479
  :group_name => options['group'],
465
480
  :searchable => options.key?('searchable') ? options['searchable'] : true,
466
481
  :search_term => options['search_term'],
467
- :extensions => options['extensions'],
482
+ :extensions => options['extensions'].sort,
468
483
  :primary_extension => options['primary_extension'],
469
484
  :overrides => options['overrides'],
470
485
  :filenames => options['filenames'],
@@ -12,8 +12,9 @@
12
12
  # ace_mode - A String name of Ace Mode (if available)
13
13
  # extension - An Array of associated extensions
14
14
  # primary_extension - A String for the main extension associated with
15
- # the langauge. (defaults to extensions.first).
16
- # Must be unique.
15
+ # the language. Must be unique. Used when a Language is picked
16
+ # from a dropdown and we need to automatically choose an
17
+ # extension.
17
18
  # overrides - An Array of extensions that takes precedence over conflicts
18
19
  # searchable - Boolean flag to enable searching (defaults to true)
19
20
  # search_term - Deprecated: Some languages maybe indexed under a
@@ -50,12 +51,14 @@ ActionScript:
50
51
  search_term: as3
51
52
  aliases:
52
53
  - as3
54
+ primary_extension: .as
53
55
  extensions:
54
56
  - .as
55
57
 
56
58
  Ada:
57
59
  type: programming
58
60
  color: "#02f88c"
61
+ primary_extension: .adb
59
62
  extensions:
60
63
  - .adb
61
64
  - .ads
@@ -66,21 +69,17 @@ Apex:
66
69
  primary_extension: .cls
67
70
  overrides:
68
71
  - .cls
69
- extensions:
70
- - .cls
71
72
 
72
73
  AppleScript:
73
74
  aliases:
74
75
  - osascript
75
76
  primary_extension: .scpt
76
- extensions:
77
- - .applescript
78
- - .scpt
79
77
 
80
78
  Arc:
81
79
  type: programming
82
80
  color: "#ca2afe"
83
81
  lexer: Text only
82
+ primary_extension: .arc
84
83
  extensions:
85
84
  - .arc
86
85
 
@@ -88,8 +87,7 @@ Arduino:
88
87
  type: programming
89
88
  color: "#bd79d1"
90
89
  lexer: C++
91
- extensions:
92
- - .ino
90
+ primary_extension: .ino
93
91
 
94
92
  Assembly:
95
93
  type: programming
@@ -98,11 +96,13 @@ Assembly:
98
96
  search_term: nasm
99
97
  aliases:
100
98
  - nasm
99
+ primary_extension: .asm
101
100
  extensions:
102
101
  - .asm
103
102
 
104
103
  Augeas:
105
104
  type: programming
105
+ primary_extension: .aug
106
106
  extensions:
107
107
  - .aug
108
108
 
@@ -112,8 +112,7 @@ AutoHotkey:
112
112
  color: "#6594b9"
113
113
  aliases:
114
114
  - ahk
115
- extensions:
116
- - .ahk
115
+ primary_extension: .ahk
117
116
 
118
117
  Batchfile:
119
118
  type: programming
@@ -127,26 +126,31 @@ Batchfile:
127
126
  - .cmd
128
127
 
129
128
  Befunge:
129
+ primary_extension: .befunge
130
130
  extensions:
131
131
  - .befunge
132
132
 
133
133
  BlitzMax:
134
+ primary_extension: .bmx
134
135
  extensions:
135
136
  - .bmx
136
137
 
137
138
  Boo:
138
139
  type: programming
139
140
  color: "#d4bec1"
141
+ primary_extension: .boo
140
142
  extensions:
141
143
  - .boo
142
144
 
143
145
  Brainfuck:
146
+ primary_extension: .b
144
147
  extensions:
145
148
  - .b
146
149
  - .bf
147
150
 
148
151
  Bro:
149
152
  type: programming
153
+ primary_extension: .bro
150
154
  extensions:
151
155
  - .bro
152
156
 
@@ -157,8 +161,6 @@ C:
157
161
  - .h
158
162
  primary_extension: .c
159
163
  extensions:
160
- - .c
161
- - .h
162
164
  - .w
163
165
 
164
166
  C#:
@@ -168,6 +170,7 @@ C#:
168
170
  color: "#5a25a2"
169
171
  aliases:
170
172
  - csharp
173
+ primary_extension: .cs
171
174
  extensions:
172
175
  - .cs
173
176
 
@@ -181,20 +184,16 @@ C++:
181
184
  primary_extension: .cpp
182
185
  extensions:
183
186
  - .c++
184
- - .cc
185
- - .cpp
186
- - .cu
187
187
  - .cxx
188
- - .h
189
188
  - .h++
190
189
  - .hh
191
- - .hpp
192
190
  - .hxx
193
191
  - .tcc
194
192
 
195
193
  C-ObjDump:
196
194
  type: data
197
195
  lexer: c-objdump
196
+ primary_extension: .c-objdump
198
197
  extensions:
199
198
  - .c-objdump
200
199
 
@@ -204,10 +203,12 @@ C2hs Haskell:
204
203
  group: Haskell
205
204
  aliases:
206
205
  - c2hs
206
+ primary_extension: .chs
207
207
  extensions:
208
208
  - .chs
209
209
 
210
210
  CMake:
211
+ primary_extension: .cmake
211
212
  extensions:
212
213
  - .cmake
213
214
  - .cmake.in
@@ -216,11 +217,18 @@ CMake:
216
217
 
217
218
  CSS:
218
219
  ace_mode: css
220
+ primary_extension: .css
219
221
  extensions:
220
222
  - .css
221
223
 
224
+ Ceylon:
225
+ type: programming
226
+ lexer: Text only
227
+ primary_extension: .ceylon
228
+
222
229
  ChucK:
223
230
  lexer: Java
231
+ primary_extension: .ck
224
232
  extensions:
225
233
  - .ck
226
234
 
@@ -272,12 +280,11 @@ Common Lisp:
272
280
  Coq:
273
281
  type: programming
274
282
  primary_extension: .coq
275
- extensions:
276
- - .v
277
283
 
278
284
  Cpp-ObjDump:
279
285
  type: data
280
286
  lexer: cpp-objdump
287
+ primary_extension: .cppobjdump
281
288
  extensions:
282
289
  - .cppobjdump
283
290
  - .c++objdump
@@ -285,6 +292,7 @@ Cpp-ObjDump:
285
292
 
286
293
  Cucumber:
287
294
  lexer: Gherkin
295
+ primary_extension: .feature
288
296
  extensions:
289
297
  - .feature
290
298
 
@@ -300,6 +308,7 @@ Cython:
300
308
  D:
301
309
  type: programming
302
310
  color: "#fcd46d"
311
+ primary_extension: .d
303
312
  extensions:
304
313
  - .d
305
314
  - .di
@@ -307,6 +316,7 @@ D:
307
316
  D-ObjDump:
308
317
  type: data
309
318
  lexer: d-objdump
319
+ primary_extension: .d-objdump
310
320
  extensions:
311
321
  - .d-objdump
312
322
 
@@ -314,21 +324,20 @@ Darcs Patch:
314
324
  search_term: dpatch
315
325
  aliases:
316
326
  - dpatch
327
+ primary_extension: .darcspatch
317
328
  extensions:
318
329
  - .darcspatch
319
330
  - .dpatch
320
331
 
321
332
  Dart:
322
333
  type: programming
323
- extensions:
324
- - .dart
334
+ primary_extension: .dart
325
335
 
326
336
  Delphi:
327
337
  type: programming
328
338
  color: "#b0ce4e"
329
339
  primary_extension: .pas
330
340
  extensions:
331
- - .dpr
332
341
  - .lpr
333
342
  - .pas
334
343
 
@@ -343,13 +352,14 @@ DCPU-16 ASM:
343
352
  - dasm16
344
353
 
345
354
  Diff:
355
+ primary_extension: .diff
346
356
  extensions:
347
357
  - .diff
348
- - .patch
349
358
 
350
359
  Dylan:
351
360
  type: programming
352
361
  color: "#3ebc27"
362
+ primary_extension: .dylan
353
363
  extensions:
354
364
  - .dylan
355
365
 
@@ -357,6 +367,7 @@ Ecere Projects:
357
367
  type: data
358
368
  group: JavaScript
359
369
  lexer: JSON
370
+ primary_extension: .epj
360
371
  extensions:
361
372
  - .epj
362
373
 
@@ -364,6 +375,7 @@ Eiffel:
364
375
  type: programming
365
376
  lexer: Text only
366
377
  color: "#946d57"
378
+ primary_extension: .e
367
379
  extensions:
368
380
  - .e
369
381
 
@@ -384,7 +396,6 @@ Emacs Lisp:
384
396
  - emacs
385
397
  primary_extension: .el
386
398
  extensions:
387
- - .el
388
399
  - .emacs
389
400
 
390
401
  Erlang:
@@ -400,6 +411,7 @@ F#:
400
411
  lexer: FSharp
401
412
  color: "#b845fc"
402
413
  search_term: ocaml
414
+ primary_extension: .fs
403
415
  extensions:
404
416
  - .fs
405
417
  - .fsi
@@ -431,6 +443,7 @@ FORTRAN:
431
443
  Factor:
432
444
  type: programming
433
445
  color: "#636746"
446
+ primary_extension: .factor
434
447
  extensions:
435
448
  - .factor
436
449
 
@@ -447,6 +460,7 @@ Fancy:
447
460
  Fantom:
448
461
  type: programming
449
462
  color: "#dbded5"
463
+ primary_extension: .fan
450
464
  extensions:
451
465
  - .fan
452
466
 
@@ -456,21 +470,23 @@ GAS:
456
470
  primary_extension: .s
457
471
  extensions:
458
472
  - .S
459
- - .s
460
473
 
461
474
  Genshi:
475
+ primary_extension: .kid
462
476
  extensions:
463
477
  - .kid
464
478
 
465
479
  Gentoo Ebuild:
466
480
  group: Shell
467
481
  lexer: Bash
482
+ primary_extension: .ebuild
468
483
  extensions:
469
484
  - .ebuild
470
485
 
471
486
  Gentoo Eclass:
472
487
  group: Shell
473
488
  lexer: Bash
489
+ primary_extension: .eclass
474
490
  extensions:
475
491
  - .eclass
476
492
 
@@ -479,6 +495,7 @@ Gettext Catalog:
479
495
  searchable: false
480
496
  aliases:
481
497
  - pot
498
+ primary_extension: .po
482
499
  extensions:
483
500
  - .po
484
501
  - .pot
@@ -486,6 +503,7 @@ Gettext Catalog:
486
503
  Go:
487
504
  type: programming
488
505
  color: "#8d04eb"
506
+ primary_extension: .go
489
507
  extensions:
490
508
  - .go
491
509
 
@@ -493,12 +511,6 @@ Gosu:
493
511
  type: programming
494
512
  color: "#82937f"
495
513
  primary_extension: .gs
496
- extensions:
497
- - .gs
498
- - .gsp
499
- - .gst
500
- - .gsx
501
- - .vark
502
514
 
503
515
  Groff:
504
516
  primary_extension: .man
@@ -517,9 +529,6 @@ Groovy:
517
529
  ace_mode: groovy
518
530
  color: "#e69f56"
519
531
  primary_extension: .groovy
520
- extensions:
521
- - .gradle
522
- - .groovy
523
532
 
524
533
  Groovy Server Pages:
525
534
  group: Groovy
@@ -528,8 +537,7 @@ Groovy Server Pages:
528
537
  - .gsp
529
538
  aliases:
530
539
  - gsp
531
- extensions:
532
- - .gsp
540
+ primary_extension: .gsp
533
541
 
534
542
  HTML:
535
543
  type: markup
@@ -544,6 +552,7 @@ HTML+Django:
544
552
  type: markup
545
553
  group: HTML
546
554
  lexer: HTML+Django/Jinja
555
+ primary_extension: .mustache # TODO: This is incorrect
547
556
  extensions:
548
557
  - .mustache
549
558
 
@@ -559,6 +568,7 @@ HTML+ERB:
559
568
  HTML+PHP:
560
569
  type: markup
561
570
  group: HTML
571
+ primary_extension: .phtml
562
572
  extensions:
563
573
  - .phtml
564
574
 
@@ -567,6 +577,7 @@ HaXe:
567
577
  lexer: haXe
568
578
  ace_mode: haxe
569
579
  color: "#346d51"
580
+ primary_extension: .hx
570
581
  extensions:
571
582
  - .hx
572
583
  - .hxml
@@ -575,12 +586,12 @@ HaXe:
575
586
  Haml:
576
587
  group: HTML
577
588
  type: markup
578
- extensions:
579
- - .haml
589
+ primary_extension: .haml
580
590
 
581
591
  Haskell:
582
592
  type: programming
583
593
  color: "#29b544"
594
+ primary_extension: .hs
584
595
  extensions:
585
596
  - .hs
586
597
  - .hsc
@@ -592,6 +603,7 @@ INI:
592
603
  - .ini
593
604
  - .prefs
594
605
  - .properties
606
+ primary_extension: .ini
595
607
  filenames:
596
608
  - .gitconfig
597
609
 
@@ -600,26 +612,28 @@ IRC log:
600
612
  search_term: irc
601
613
  aliases:
602
614
  - irc
615
+ primary_extension: .irclog
603
616
  extensions:
604
617
  - .weechatlog
605
618
 
606
619
  Io:
607
620
  type: programming
608
621
  color: "#a9188d"
622
+ primary_extension: .io
609
623
  extensions:
610
624
  - .io
611
625
 
612
626
  Ioke:
613
627
  type: programming
614
628
  color: "#078193"
615
- extensions:
616
- - .ik
629
+ primary_extension: .ik
617
630
 
618
631
  JSON:
619
632
  type: data
620
633
  group: JavaScript
621
634
  ace_mode: json
622
635
  searchable: false
636
+ primary_extension: .json
623
637
  extensions:
624
638
  - .json
625
639
 
@@ -627,8 +641,8 @@ Java:
627
641
  type: programming
628
642
  ace_mode: java
629
643
  color: "#b07219"
644
+ primary_extension: .java
630
645
  extensions:
631
- - .java
632
646
  - .pde
633
647
 
634
648
  Java Server Pages:
@@ -637,6 +651,7 @@ Java Server Pages:
637
651
  search_term: jsp
638
652
  aliases:
639
653
  - jsp
654
+ primary_extension: .jsp
640
655
  extensions:
641
656
  - .jsp
642
657
 
@@ -652,7 +667,6 @@ JavaScript:
652
667
  - ._js
653
668
  - .bones
654
669
  - .jake
655
- - .js
656
670
  - .jsfl
657
671
  - .jsm
658
672
  - .jss
@@ -665,17 +679,17 @@ JavaScript:
665
679
 
666
680
  Julia:
667
681
  type: programming
668
- extensions:
669
- - .jl
682
+ primary_extension: .jl
670
683
 
671
684
  Kotlin:
672
685
  type: programming
686
+ primary_extension: .kt
673
687
  extensions:
674
- - .kt
675
688
  - .ktm
676
689
  - .kts
677
690
 
678
691
  LLVM:
692
+ primary_extension: .ll
679
693
  extensions:
680
694
  - .ll
681
695
 
@@ -692,18 +706,19 @@ Literate Haskell:
692
706
  search_term: lhs
693
707
  aliases:
694
708
  - lhs
709
+ primary_extension: .lhs
695
710
  extensions:
696
711
  - .lhs
697
712
 
698
713
  Logtalk:
699
714
  type: programming
700
- extensions:
701
- - .lgt
715
+ primary_extension: .lgt
702
716
 
703
717
  Lua:
704
718
  type: programming
705
719
  ace_mode: lua
706
720
  color: "#fa1fa1"
721
+ primary_extension: .lua
707
722
  extensions:
708
723
  - .lua
709
724
  - .nse
@@ -712,12 +727,14 @@ Makefile:
712
727
  extensions:
713
728
  - .mak
714
729
  - .mk
730
+ primary_extension: .mak
715
731
  filenames:
716
732
  - makefile
717
733
  - Makefile
718
734
  - GNUmakefile
719
735
 
720
736
  Mako:
737
+ primary_extension: .mako
721
738
  extensions:
722
739
  - .mako
723
740
  - .mao
@@ -729,7 +746,6 @@ Markdown:
729
746
  primary_extension: .md
730
747
  extensions:
731
748
  - .markdown
732
- - .md
733
749
  - .mkd
734
750
  - .mkdown
735
751
  - .ron
@@ -739,13 +755,13 @@ Matlab:
739
755
  color: "#bb92ac"
740
756
  primary_extension: .matlab
741
757
  extensions:
742
- - .m
743
758
  - .matlab
744
759
 
745
760
  Max/MSP:
746
761
  type: programming
747
762
  color: "#ce279c"
748
763
  lexer: Text only
764
+ primary_extension: .mxt
749
765
  extensions:
750
766
  - .mxt
751
767
 
@@ -758,6 +774,7 @@ Mirah:
758
774
  lexer: Ruby
759
775
  search_term: ruby
760
776
  color: "#c7a938"
777
+ primary_extension: .druby
761
778
  extensions:
762
779
  - .duby
763
780
  - .mir
@@ -765,24 +782,25 @@ Mirah:
765
782
 
766
783
  Moocode:
767
784
  lexer: MOOCode
785
+ primary_extension: .moo
768
786
  extensions:
769
787
  - .moo
770
788
 
771
789
  Myghty:
790
+ primary_extension: .myt
772
791
  extensions:
773
792
  - .myt
774
793
 
775
794
  Nemerle:
776
795
  type: programming
777
796
  color: "#0d3c6e"
778
- extensions:
779
- - .n
797
+ primary_extension: .n
780
798
 
781
799
  Nimrod:
782
800
  type: programming
783
801
  color: "#37775b"
802
+ primary_extension: .nim
784
803
  extensions:
785
- - .nim
786
804
  - .nimrod
787
805
 
788
806
  Nu:
@@ -791,8 +809,7 @@ Nu:
791
809
  color: "#c9df40"
792
810
  aliases:
793
811
  - nush
794
- extensions:
795
- - .nu
812
+ primary_extension: .nu
796
813
  filenames:
797
814
  - Nukefile
798
815
 
@@ -810,7 +827,6 @@ OCaml:
810
827
  color: "#3be133"
811
828
  primary_extension: .ml
812
829
  extensions:
813
- - .ml
814
830
  - .mli
815
831
  - .mll
816
832
  - .mly
@@ -818,6 +834,7 @@ OCaml:
818
834
  ObjDump:
819
835
  type: data
820
836
  lexer: objdump
837
+ primary_extension: .objdump
821
838
  extensions:
822
839
  - .objdump
823
840
 
@@ -828,28 +845,25 @@ Objective-C:
828
845
  - .m
829
846
  primary_extension: .m
830
847
  extensions:
831
- - .h
832
- - .m
833
848
  - .mm
834
849
 
835
850
  Objective-J:
836
851
  type: programming
837
852
  color: "#ff0c5a"
853
+ primary_extension: .j
838
854
  extensions:
839
855
  - .j
840
856
  - .sj
841
857
 
842
858
  Opa:
843
859
  type: programming
844
- extensions:
845
- - .opa
860
+ primary_extension: .opa
846
861
 
847
862
  OpenCL:
848
863
  type: programming
849
864
  group: C
850
865
  lexer: C
851
- extensions:
852
- - .cl
866
+ primary_extension: .cl
853
867
 
854
868
  OpenEdge ABL:
855
869
  type: programming
@@ -858,18 +872,15 @@ OpenEdge ABL:
858
872
  - openedge
859
873
  - abl
860
874
  primary_extension: .p
861
- extensions:
862
- - .cls
863
- - .p
864
875
 
865
876
  PHP:
866
877
  type: programming
867
878
  ace_mode: php
868
879
  color: "#6e03c1"
880
+ primary_extension: .php
869
881
  extensions:
870
882
  - .aw
871
883
  - .ctp
872
- - .php
873
884
  - .php3
874
885
  - .php4
875
886
  - .php5
@@ -889,8 +900,7 @@ Parrot Internal Representation:
889
900
  lexer: Text only
890
901
  aliases:
891
902
  - pir
892
- extensions:
893
- - .pir
903
+ primary_extension: .pir
894
904
 
895
905
  Parrot Assembly:
896
906
  group: Parrot
@@ -898,8 +908,7 @@ Parrot Assembly:
898
908
  lexer: Text only
899
909
  aliases:
900
910
  - pasm
901
- extensions:
902
- - .pasm
911
+ primary_extension: .pasm
903
912
 
904
913
  Perl:
905
914
  type: programming
@@ -912,35 +921,30 @@ Perl:
912
921
  - .PL
913
922
  - .perl
914
923
  - .ph
915
- - .pl
916
924
  - .plx
917
- - .pm
918
925
  - .pm6
919
926
  - .pod
920
927
  - .psgi
921
- - .t
922
928
 
923
929
  PowerShell:
924
930
  type: programming
925
931
  ace_mode: powershell
926
932
  aliases:
927
933
  - posh
928
- extensions:
929
- - .ps1
930
- - .psm1
934
+ primary_extension: .ps1
931
935
 
932
936
  Prolog:
933
937
  type: programming
934
938
  color: "#74283c"
935
939
  primary_extension: .prolog
936
940
  extensions:
937
- - .pl
938
941
  - .pro
939
942
  - .prolog
940
943
 
941
944
  Puppet:
942
945
  type: programming
943
946
  color: "#cc5555"
947
+ primary_extension: .pp
944
948
  extensions:
945
949
  - .pp
946
950
  filenames:
@@ -950,6 +954,7 @@ Pure Data:
950
954
  type: programming
951
955
  color: "#91de79"
952
956
  lexer: Text only
957
+ primary_extension: .pd
953
958
  extensions:
954
959
  - .pd
955
960
 
@@ -959,7 +964,6 @@ Python:
959
964
  color: "#3581ba"
960
965
  primary_extension: .py
961
966
  extensions:
962
- - .py
963
967
  - .pyw
964
968
  - .wsgi
965
969
  - .xpy
@@ -971,6 +975,7 @@ Python traceback:
971
975
  group: Python
972
976
  lexer: Python Traceback
973
977
  searchable: false
978
+ primary_extension: .pytb
974
979
  extensions:
975
980
  - .pytb
976
981
 
@@ -982,12 +987,12 @@ R:
982
987
  - .r
983
988
  primary_extension: .r
984
989
  extensions:
985
- - .R
986
990
  - .r
987
991
 
988
992
  RHTML:
989
993
  type: markup
990
994
  group: HTML
995
+ primary_extension: .rhtml
991
996
  extensions:
992
997
  - .rhtml
993
998
 
@@ -997,15 +1002,14 @@ Racket:
997
1002
  color: "#ae17ff"
998
1003
  primary_extension: .rkt
999
1004
  extensions:
1000
- - .rkt
1001
1005
  - .rktd
1002
1006
  - .rktl
1003
- - .scrbl
1004
1007
 
1005
1008
  Raw token data:
1006
1009
  search_term: raw
1007
1010
  aliases:
1008
1011
  - raw
1012
+ primary_extension: .raw
1009
1013
  extensions:
1010
1014
  - .raw
1011
1015
 
@@ -1015,12 +1019,12 @@ Rebol:
1015
1019
  color: "#358a5b"
1016
1020
  primary_extension: .rebol
1017
1021
  extensions:
1018
- - .r
1019
1022
  - .r2
1020
1023
  - .r3
1021
1024
  - .rebol
1022
1025
 
1023
1026
  Redcode:
1027
+ primary_extension: .cw
1024
1028
  extensions:
1025
1029
  - .cw
1026
1030
 
@@ -1041,8 +1045,6 @@ Ruby:
1041
1045
  - .god
1042
1046
  - .irbrc
1043
1047
  - .podspec
1044
- - .rake
1045
- - .rb
1046
1048
  - .rbuild
1047
1049
  - .rbw
1048
1050
  - .rbx
@@ -1050,11 +1052,9 @@ Ruby:
1050
1052
  - .thor
1051
1053
  - .watchr
1052
1054
  filenames:
1053
- - Capfile
1054
1055
  - Gemfile
1055
1056
  - Guardfile
1056
1057
  - Podfile
1057
- - Rakefile
1058
1058
  - Thorfile
1059
1059
  - Vagrantfile
1060
1060
 
@@ -1062,20 +1062,19 @@ Rust:
1062
1062
  type: programming
1063
1063
  color: "#dea584"
1064
1064
  lexer: Text only
1065
- extensions:
1066
- - .rs
1065
+ primary_extension: .rs
1067
1066
 
1068
1067
  SCSS:
1069
1068
  type: markup
1070
1069
  group: CSS
1071
1070
  ace_mode: scss
1072
- extensions:
1073
- - .scss
1071
+ primary_extension: .scss
1074
1072
 
1075
1073
  SQL:
1076
1074
  type: data
1077
1075
  ace_mode: sql
1078
1076
  searchable: false
1077
+ primary_extension: .sql
1079
1078
  extensions:
1080
1079
  - .sql
1081
1080
 
@@ -1083,23 +1082,20 @@ Sage:
1083
1082
  type: programming
1084
1083
  lexer: Python
1085
1084
  group: Python
1085
+ primary_extension: .sage
1086
1086
  extensions:
1087
1087
  - .sage
1088
1088
 
1089
1089
  Sass:
1090
1090
  type: markup
1091
1091
  group: CSS
1092
- extensions:
1093
- - .sass
1092
+ primary_extension: .sass
1094
1093
 
1095
1094
  Scala:
1096
1095
  type: programming
1097
1096
  ace_mode: scala
1098
1097
  color: "#7dd3b0"
1099
1098
  primary_extension: .scala
1100
- extensions:
1101
- - .sbt
1102
- - .scala
1103
1099
 
1104
1100
  Scheme:
1105
1101
  type: programming
@@ -1108,20 +1104,17 @@ Scheme:
1108
1104
  extensions:
1109
1105
  - .scm
1110
1106
  - .sls
1111
- - .sps
1112
1107
  - .ss
1113
1108
 
1114
1109
  Scilab:
1115
1110
  type: programming
1116
1111
  primary_extension: .sci
1117
- extensions:
1118
- - .sce
1119
- - .tst
1120
1112
 
1121
1113
  Self:
1122
1114
  type: programming
1123
1115
  color: "#0579aa"
1124
1116
  lexer: Text only
1117
+ primary_extension: .self
1125
1118
  extensions:
1126
1119
  - .self
1127
1120
 
@@ -1135,10 +1128,6 @@ Shell:
1135
1128
  - bash
1136
1129
  - zsh
1137
1130
  primary_extension: .sh
1138
- extensions:
1139
- - .bash
1140
- - .sh
1141
- - .zsh
1142
1131
  filenames:
1143
1132
  - .bash_profile
1144
1133
  - .bashrc
@@ -1148,15 +1137,16 @@ Shell:
1148
1137
  - .zshrc
1149
1138
  - bashrc
1150
1139
  - zshrc
1151
- - PKGBUILD
1152
1140
 
1153
1141
  Smalltalk:
1154
1142
  type: programming
1155
1143
  color: "#596706"
1144
+ primary_extension: .st
1156
1145
  extensions:
1157
1146
  - .st
1158
1147
 
1159
1148
  Smarty:
1149
+ primary_extension: .tpl
1160
1150
  extensions:
1161
1151
  - .tpl
1162
1152
 
@@ -1166,20 +1156,17 @@ Standard ML:
1166
1156
  aliases:
1167
1157
  - sml
1168
1158
  primary_extension: .sml
1169
- extensions:
1170
- - .sig
1171
- - .sml
1172
1159
 
1173
1160
  SuperCollider:
1174
1161
  type: programming
1175
1162
  color: "#46390b"
1176
1163
  lexer: Text only
1177
- extensions:
1178
- - .sc
1164
+ primary_extension: .sc
1179
1165
 
1180
1166
  Tcl:
1181
1167
  type: programming
1182
1168
  color: "#e4cc98"
1169
+ primary_extension: .tcl
1183
1170
  extensions:
1184
1171
  - .tcl
1185
1172
 
@@ -1197,7 +1184,6 @@ TeX:
1197
1184
  primary_extension: .tex
1198
1185
  extensions:
1199
1186
  - .aux
1200
- - .cls
1201
1187
  - .dtx
1202
1188
  - .ins
1203
1189
  - .ltx
@@ -1207,13 +1193,13 @@ TeX:
1207
1193
 
1208
1194
  Tea:
1209
1195
  type: markup
1210
- extensions:
1211
- - .tea
1196
+ primary_extension: .tea
1212
1197
 
1213
1198
  Text:
1214
1199
  type: data
1215
1200
  lexer: Text only
1216
1201
  ace_mode: text
1202
+ primary_extension: .txt
1217
1203
  extensions:
1218
1204
  - .txt
1219
1205
 
@@ -1221,6 +1207,7 @@ Textile:
1221
1207
  type: markup
1222
1208
  lexer: Text only
1223
1209
  ace_mode: textile
1210
+ primary_extension: .textile
1224
1211
  extensions:
1225
1212
  - .textile
1226
1213
 
@@ -1232,13 +1219,13 @@ Turing:
1232
1219
  overrides:
1233
1220
  - .t
1234
1221
  extensions:
1235
- - .t
1236
1222
  - .tu
1237
1223
 
1238
1224
  Twig:
1239
1225
  type: markup
1240
1226
  group: PHP
1241
1227
  lexer: HTML+Django/Jinja
1228
+ primary_extension: .twig
1242
1229
  extensions:
1243
1230
  - .twig
1244
1231
 
@@ -1246,13 +1233,14 @@ VHDL:
1246
1233
  type: programming
1247
1234
  lexer: vhdl
1248
1235
  color: "#543978"
1236
+ primary_extension: .vhdl
1249
1237
  extensions:
1250
- - .vhd
1251
1238
  - .vhdl
1252
1239
 
1253
1240
  Vala:
1254
1241
  type: programming
1255
1242
  color: "#ee7d06"
1243
+ primary_extension: .vala
1256
1244
  extensions:
1257
1245
  - .vala
1258
1246
  - .vapi
@@ -1263,8 +1251,7 @@ Verilog:
1263
1251
  color: "#848bf3"
1264
1252
  overrides:
1265
1253
  - .v
1266
- extensions:
1267
- - .v
1254
+ primary_extension: .v
1268
1255
 
1269
1256
  VimL:
1270
1257
  type: programming
@@ -1272,6 +1259,7 @@ VimL:
1272
1259
  search_term: vim
1273
1260
  aliases:
1274
1261
  - vim
1262
+ primary_extension: .vim
1275
1263
  extensions:
1276
1264
  - .vim
1277
1265
  filenames:
@@ -1287,7 +1275,6 @@ Visual Basic:
1287
1275
  primary_extension: .vb
1288
1276
  extensions:
1289
1277
  - .bas
1290
- - .cls
1291
1278
  - .frx
1292
1279
  - .vb
1293
1280
  - .vba
@@ -1312,7 +1299,6 @@ XML:
1312
1299
  - .xaml
1313
1300
  - .xlf
1314
1301
  - .xliff
1315
- - .xml
1316
1302
  - .xsd
1317
1303
  - .xsl
1318
1304
  - .xul
@@ -1323,22 +1309,22 @@ XML:
1323
1309
  XQuery:
1324
1310
  type: programming
1325
1311
  color: "#2700e2"
1312
+ primary_extension: .xquery
1326
1313
  extensions:
1327
1314
  - .xq
1328
- - .xqm
1329
1315
  - .xquery
1330
1316
  - .xqy
1331
1317
 
1332
1318
  XS:
1333
1319
  lexer: C
1320
+ primary_extension: .xs
1334
1321
  extensions:
1335
1322
  - .xs
1336
1323
 
1337
1324
  XSLT:
1338
1325
  type: markup
1339
1326
  group: XML
1340
- extensions:
1341
- - .xslt
1327
+ primary_extension: .xslt
1342
1328
 
1343
1329
  YAML:
1344
1330
  type: markup
@@ -1359,6 +1345,7 @@ eC:
1359
1345
 
1360
1346
  mupad:
1361
1347
  lexer: MuPAD
1348
+ primary_extension: .mu
1362
1349
  extensions:
1363
1350
  - .mu
1364
1351
 
@@ -1366,6 +1353,7 @@ ooc:
1366
1353
  type: programming
1367
1354
  lexer: Ooc
1368
1355
  color: "#b0b77e"
1356
+ primary_extension: .ooc
1369
1357
  extensions:
1370
1358
  - .ooc
1371
1359
 
@@ -1374,6 +1362,7 @@ reStructuredText:
1374
1362
  search_term: rst
1375
1363
  aliases:
1376
1364
  - rst
1365
+ primary_extension: .rst
1377
1366
  extensions:
1378
1367
  - .rst
1379
1368
  - .rest