github-linguist 8.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/grammars/go.mod.json +1 -1
- data/grammars/liquid.injection.json +1 -1
- data/grammars/markdown.vue.codeblock.json +1 -0
- data/grammars/mdx.vue.codeblock.json +1 -0
- data/grammars/source.QB64.json +1 -0
- data/grammars/source.abap.json +1 -1
- data/grammars/source.abl.json +1 -1
- data/grammars/source.angelscript.json +1 -1
- data/grammars/source.answersetprogramming.json +1 -0
- data/grammars/source.apacheconf.json +1 -0
- data/grammars/source.assembly.json +1 -1
- data/grammars/source.ats.json +1 -1
- data/grammars/source.basic.json +1 -1
- data/grammars/source.bb.json +1 -1
- data/grammars/source.brs.json +1 -1
- data/grammars/source.bsl.json +1 -1
- data/grammars/source.bst.json +1 -0
- data/grammars/source.c.linker.json +1 -0
- data/grammars/source.cairo0.json +1 -1
- data/grammars/source.cmake.json +1 -1
- data/grammars/source.cmakecache.json +1 -0
- data/grammars/source.cobol.json +1 -1
- data/grammars/source.cs.json +1 -1
- data/grammars/source.curry.json +1 -1
- data/grammars/source.dart.json +1 -1
- data/grammars/source.dds.dspf.json +1 -1
- data/grammars/source.erlang.json +1 -1
- data/grammars/source.fsharp.json +1 -1
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.git-revlist.json +1 -1
- data/grammars/source.gleam.json +1 -1
- data/grammars/source.graphql.json +1 -1
- data/grammars/source.hack.json +1 -1
- data/grammars/source.hcl.json +1 -1
- data/grammars/source.hcl.terraform.json +1 -1
- data/grammars/source.ice.json +1 -1
- data/grammars/source.ispc.json +1 -0
- data/grammars/source.jai.json +1 -0
- data/grammars/source.json.comments.json +1 -0
- data/grammars/source.julia.json +1 -1
- data/grammars/source.just.json +1 -1
- data/grammars/source.kdl.json +1 -0
- data/grammars/source.lean.markdown.json +1 -1
- data/grammars/source.lean4.markdown.json +1 -1
- data/grammars/source.luau.json +1 -1
- data/grammars/source.matlab.json +1 -1
- data/grammars/source.mdx.astro.json +1 -0
- data/grammars/source.mdx.json +1 -1
- data/grammars/source.mo.json +1 -1
- data/grammars/source.moonbit.json +1 -0
- data/grammars/source.msg.json +1 -0
- data/grammars/source.mzn.json +1 -0
- data/grammars/source.ned.json +1 -0
- data/grammars/source.nr.json +1 -1
- data/grammars/source.nushell.json +1 -1
- data/grammars/source.odin.json +1 -1
- data/grammars/source.openesql.json +1 -0
- data/grammars/source.overpassql.json +1 -0
- data/grammars/source.p4.json +1 -1
- data/grammars/source.polar.json +1 -1
- data/grammars/source.powerbuilder.json +1 -1
- data/grammars/source.prisma.json +1 -1
- data/grammars/source.purescript.json +1 -1
- data/grammars/source.ql.json +1 -1
- data/grammars/source.qsharp.json +1 -1
- data/grammars/source.rascal.json +1 -1
- data/grammars/source.rescript.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.scala.json +1 -1
- data/grammars/source.scm.json +1 -0
- data/grammars/source.sdbl.json +1 -1
- data/grammars/source.slang.json +1 -0
- data/grammars/source.slice.json +1 -1
- data/grammars/source.sourcepawn.json +1 -1
- data/grammars/source.stan.json +1 -1
- data/grammars/source.swift.json +1 -1
- data/grammars/source.tact.json +1 -0
- data/grammars/source.talon.json +1 -1
- data/grammars/source.templ.json +1 -1
- data/grammars/source.textgrid.json +1 -1
- data/grammars/source.toc.json +1 -1
- data/grammars/source.ts.json +1 -1
- data/grammars/source.ts.prismaClientRawSQL.json +1 -1
- data/grammars/source.tsp.json +1 -0
- data/grammars/source.tsx.json +1 -1
- data/grammars/source.typst.json +1 -1
- data/grammars/source.vba.json +1 -1
- data/grammars/source.vue.json +1 -0
- data/grammars/source.wdl.json +1 -1
- data/grammars/source.xmake.json +1 -0
- data/grammars/text.adblock.json +1 -1
- data/grammars/text.html.liquid.json +1 -1
- data/grammars/text.html.markdown.d2.json +1 -1
- data/grammars/text.md.json +1 -1
- data/grammars/text.rtf.json +1 -1
- data/grammars/version +1 -1
- data/grammars/vue.directives.json +1 -0
- data/grammars/vue.interpolations.json +1 -0
- data/grammars/vue.sfc.style.variable.injection.json +1 -0
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +32 -1
- data/lib/linguist/generic.yml +1 -0
- data/lib/linguist/heuristics.yml +109 -25
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +232 -10
- data/lib/linguist/lazy_blob.rb +15 -7
- data/lib/linguist/repository.rb +18 -13
- data/lib/linguist/samples.json +1 -1
- data/lib/linguist/shebang.rb +1 -1
- data/lib/linguist/source/diff.rb +72 -0
- data/lib/linguist/source/repository.rb +64 -0
- data/lib/linguist/source/rugged.rb +95 -0
- metadata +34 -9
- data/grammars/source.apache-config.json +0 -1
- data/grammars/source.apache-config.mod_perl.json +0 -1
- data/grammars/source.cache.cmake.json +0 -1
- data/grammars/text.html.erlang.yaws.json +0 -1
- data/grammars/text.html.vue.json +0 -1
- data/grammars/text.mdx.astro.codeblock.json +0 -1
data/lib/linguist/languages.yml
CHANGED
@@ -307,6 +307,16 @@ AngelScript:
|
|
307
307
|
codemirror_mode: clike
|
308
308
|
codemirror_mime_type: text/x-c++src
|
309
309
|
language_id: 389477596
|
310
|
+
Answer Set Programming:
|
311
|
+
type: programming
|
312
|
+
color: "#A9CC29"
|
313
|
+
extensions:
|
314
|
+
- ".lp"
|
315
|
+
interpreters:
|
316
|
+
- clingo
|
317
|
+
tm_scope: source.answersetprogramming
|
318
|
+
ace_mode: prolog
|
319
|
+
language_id: 433009171
|
310
320
|
Ant Build System:
|
311
321
|
type: data
|
312
322
|
color: "#A9157E"
|
@@ -341,7 +351,7 @@ ApacheConf:
|
|
341
351
|
- ".htaccess"
|
342
352
|
- apache2.conf
|
343
353
|
- httpd.conf
|
344
|
-
tm_scope: source.
|
354
|
+
tm_scope: source.apacheconf
|
345
355
|
ace_mode: apache_conf
|
346
356
|
language_id: 16
|
347
357
|
Apex:
|
@@ -349,6 +359,7 @@ Apex:
|
|
349
359
|
color: "#1797c0"
|
350
360
|
extensions:
|
351
361
|
- ".cls"
|
362
|
+
- ".apex"
|
352
363
|
- ".trigger"
|
353
364
|
tm_scope: source.apex
|
354
365
|
ace_mode: java
|
@@ -417,6 +428,7 @@ Assembly:
|
|
417
428
|
- ".inc"
|
418
429
|
- ".nas"
|
419
430
|
- ".nasm"
|
431
|
+
- ".s"
|
420
432
|
tm_scope: source.assembly
|
421
433
|
ace_mode: assembly_x86
|
422
434
|
language_id: 24
|
@@ -588,6 +600,13 @@ BibTeX:
|
|
588
600
|
codemirror_mode: stex
|
589
601
|
codemirror_mime_type: text/x-stex
|
590
602
|
language_id: 982188347
|
603
|
+
BibTeX Style:
|
604
|
+
type: programming
|
605
|
+
extensions:
|
606
|
+
- ".bst"
|
607
|
+
tm_scope: source.bst
|
608
|
+
ace_mode: text
|
609
|
+
language_id: 909569041
|
591
610
|
Bicep:
|
592
611
|
type: programming
|
593
612
|
color: "#519aba"
|
@@ -748,6 +767,7 @@ C:
|
|
748
767
|
- ".c"
|
749
768
|
- ".cats"
|
750
769
|
- ".h"
|
770
|
+
- ".h.in"
|
751
771
|
- ".idc"
|
752
772
|
interpreters:
|
753
773
|
- tcc
|
@@ -908,7 +928,7 @@ CSS:
|
|
908
928
|
ace_mode: css
|
909
929
|
codemirror_mode: css
|
910
930
|
codemirror_mime_type: text/css
|
911
|
-
color: "#
|
931
|
+
color: "#663399"
|
912
932
|
extensions:
|
913
933
|
- ".css"
|
914
934
|
language_id: 50
|
@@ -1632,6 +1652,7 @@ Dockerfile:
|
|
1632
1652
|
tm_scope: source.dockerfile
|
1633
1653
|
extensions:
|
1634
1654
|
- ".dockerfile"
|
1655
|
+
- ".containerfile"
|
1635
1656
|
filenames:
|
1636
1657
|
- Containerfile
|
1637
1658
|
- Dockerfile
|
@@ -2166,7 +2187,7 @@ Fortran Free Form:
|
|
2166
2187
|
codemirror_mode: fortran
|
2167
2188
|
codemirror_mime_type: text/x-fortran
|
2168
2189
|
language_id: 761352333
|
2169
|
-
|
2190
|
+
FreeBASIC:
|
2170
2191
|
type: programming
|
2171
2192
|
color: "#141AC9"
|
2172
2193
|
extensions:
|
@@ -2834,9 +2855,9 @@ HTML+EEX:
|
|
2834
2855
|
- heex
|
2835
2856
|
- leex
|
2836
2857
|
extensions:
|
2837
|
-
- ".eex"
|
2838
|
-
- ".
|
2839
|
-
- ".
|
2858
|
+
- ".html.eex"
|
2859
|
+
- ".heex"
|
2860
|
+
- ".leex"
|
2840
2861
|
ace_mode: text
|
2841
2862
|
codemirror_mode: htmlmixed
|
2842
2863
|
codemirror_mime_type: text/html
|
@@ -2945,6 +2966,14 @@ Harbour:
|
|
2945
2966
|
tm_scope: source.harbour
|
2946
2967
|
ace_mode: text
|
2947
2968
|
language_id: 156
|
2969
|
+
Hare:
|
2970
|
+
type: programming
|
2971
|
+
color: "#9d7424"
|
2972
|
+
extensions:
|
2973
|
+
- ".ha"
|
2974
|
+
ace_mode: text
|
2975
|
+
language_id: 463518941
|
2976
|
+
tm_scope: none
|
2948
2977
|
Haskell:
|
2949
2978
|
type: programming
|
2950
2979
|
color: "#5e5086"
|
@@ -3058,6 +3087,7 @@ INI:
|
|
3058
3087
|
- ".properties"
|
3059
3088
|
- ".url"
|
3060
3089
|
filenames:
|
3090
|
+
- ".buckconfig"
|
3061
3091
|
- ".coveragerc"
|
3062
3092
|
- ".flake8"
|
3063
3093
|
- ".pylintrc"
|
@@ -3086,6 +3116,16 @@ IRC log:
|
|
3086
3116
|
codemirror_mode: mirc
|
3087
3117
|
codemirror_mime_type: text/mirc
|
3088
3118
|
language_id: 164
|
3119
|
+
ISPC:
|
3120
|
+
type: programming
|
3121
|
+
color: "#2D68B1"
|
3122
|
+
extensions:
|
3123
|
+
- ".ispc"
|
3124
|
+
tm_scope: source.ispc
|
3125
|
+
ace_mode: c_cpp
|
3126
|
+
codemirror_mode: clike
|
3127
|
+
codemirror_mime_type: text/x-csrc
|
3128
|
+
language_id: 327071
|
3089
3129
|
Idris:
|
3090
3130
|
type: programming
|
3091
3131
|
color: "#b30000"
|
@@ -3111,9 +3151,11 @@ Ignore List:
|
|
3111
3151
|
- ".coffeelintignore"
|
3112
3152
|
- ".cvsignore"
|
3113
3153
|
- ".dockerignore"
|
3154
|
+
- ".easignore"
|
3114
3155
|
- ".eleventyignore"
|
3115
3156
|
- ".eslintignore"
|
3116
3157
|
- ".gitignore"
|
3158
|
+
- ".ignore"
|
3117
3159
|
- ".markdownlintignore"
|
3118
3160
|
- ".nodemonignore"
|
3119
3161
|
- ".npmignore"
|
@@ -3270,9 +3312,11 @@ JSON:
|
|
3270
3312
|
- ".har"
|
3271
3313
|
- ".ice"
|
3272
3314
|
- ".JSON-tmLanguage"
|
3315
|
+
- ".json.example"
|
3273
3316
|
- ".jsonl"
|
3274
3317
|
- ".mcmeta"
|
3275
3318
|
- ".sarif"
|
3319
|
+
- ".tact"
|
3276
3320
|
- ".tfstate"
|
3277
3321
|
- ".tfstate.backup"
|
3278
3322
|
- ".topojson"
|
@@ -3292,7 +3336,9 @@ JSON:
|
|
3292
3336
|
- ".tern-project"
|
3293
3337
|
- ".watchmanconfig"
|
3294
3338
|
- MODULE.bazel.lock
|
3339
|
+
- Package.resolved
|
3295
3340
|
- Pipfile.lock
|
3341
|
+
- bun.lock
|
3296
3342
|
- composer.lock
|
3297
3343
|
- deno.lock
|
3298
3344
|
- flake.lock
|
@@ -3302,7 +3348,7 @@ JSON with Comments:
|
|
3302
3348
|
type: data
|
3303
3349
|
color: "#292929"
|
3304
3350
|
group: JSON
|
3305
|
-
tm_scope: source.
|
3351
|
+
tm_scope: source.json.comments
|
3306
3352
|
ace_mode: javascript
|
3307
3353
|
codemirror_mode: javascript
|
3308
3354
|
codemirror_mime_type: text/javascript
|
@@ -3371,6 +3417,14 @@ JSONiq:
|
|
3371
3417
|
- ".jq"
|
3372
3418
|
tm_scope: source.jsoniq
|
3373
3419
|
language_id: 177
|
3420
|
+
Jai:
|
3421
|
+
type: programming
|
3422
|
+
color: "#ab8b4b"
|
3423
|
+
ace_mode: text
|
3424
|
+
tm_scope: source.jai
|
3425
|
+
extensions:
|
3426
|
+
- ".jai"
|
3427
|
+
language_id: 70127133
|
3374
3428
|
Janet:
|
3375
3429
|
type: programming
|
3376
3430
|
color: "#0886a5"
|
@@ -3628,6 +3682,16 @@ Just:
|
|
3628
3682
|
- ".just"
|
3629
3683
|
ace_mode: text
|
3630
3684
|
language_id: 128447695
|
3685
|
+
KDL:
|
3686
|
+
type: data
|
3687
|
+
color: "#ffb3b3"
|
3688
|
+
extensions:
|
3689
|
+
- ".kdl"
|
3690
|
+
tm_scope: source.kdl
|
3691
|
+
ace_mode: tcl
|
3692
|
+
codemirror_mode: yacas
|
3693
|
+
codemirror_mime_type: text/x-yacas
|
3694
|
+
language_id: 931123626
|
3631
3695
|
KRL:
|
3632
3696
|
type: programming
|
3633
3697
|
color: "#28430A"
|
@@ -3901,15 +3965,22 @@ Limbo:
|
|
3901
3965
|
tm_scope: none
|
3902
3966
|
ace_mode: text
|
3903
3967
|
language_id: 201
|
3968
|
+
Linear Programming:
|
3969
|
+
type: programming
|
3970
|
+
extensions:
|
3971
|
+
- ".lp"
|
3972
|
+
tm_scope: none
|
3973
|
+
ace_mode: text
|
3974
|
+
language_id: 377204539
|
3904
3975
|
Linker Script:
|
3905
|
-
type:
|
3976
|
+
type: programming
|
3906
3977
|
extensions:
|
3907
3978
|
- ".ld"
|
3908
3979
|
- ".lds"
|
3909
3980
|
- ".x"
|
3910
3981
|
filenames:
|
3911
3982
|
- ld.script
|
3912
|
-
tm_scope:
|
3983
|
+
tm_scope: source.c.linker
|
3913
3984
|
ace_mode: text
|
3914
3985
|
language_id: 202
|
3915
3986
|
Linux Kernel Module:
|
@@ -4394,6 +4465,21 @@ MiniYAML:
|
|
4394
4465
|
codemirror_mode: yaml
|
4395
4466
|
codemirror_mime_type: text/x-yaml
|
4396
4467
|
language_id: 4896465
|
4468
|
+
MiniZinc:
|
4469
|
+
type: programming
|
4470
|
+
color: "#06a9e6"
|
4471
|
+
extensions:
|
4472
|
+
- ".mzn"
|
4473
|
+
tm_scope: source.mzn
|
4474
|
+
ace_mode: text
|
4475
|
+
language_id: 238874535
|
4476
|
+
MiniZinc Data:
|
4477
|
+
type: data
|
4478
|
+
extensions:
|
4479
|
+
- ".dzn"
|
4480
|
+
tm_scope: source.mzn
|
4481
|
+
ace_mode: text
|
4482
|
+
language_id: 938193433
|
4397
4483
|
Mint:
|
4398
4484
|
type: programming
|
4399
4485
|
extensions:
|
@@ -4489,6 +4575,14 @@ Moocode:
|
|
4489
4575
|
tm_scope: none
|
4490
4576
|
ace_mode: text
|
4491
4577
|
language_id: 237
|
4578
|
+
MoonBit:
|
4579
|
+
type: programming
|
4580
|
+
color: "#b92381"
|
4581
|
+
extensions:
|
4582
|
+
- ".mbt"
|
4583
|
+
tm_scope: source.moonbit
|
4584
|
+
ace_mode: text
|
4585
|
+
language_id: 181453007
|
4492
4586
|
MoonScript:
|
4493
4587
|
type: programming
|
4494
4588
|
color: "#ff4585"
|
@@ -4896,6 +4990,26 @@ OCaml:
|
|
4896
4990
|
- ocamlscript
|
4897
4991
|
tm_scope: source.ocaml
|
4898
4992
|
language_id: 255
|
4993
|
+
OMNeT++ MSG:
|
4994
|
+
type: programming
|
4995
|
+
extensions:
|
4996
|
+
- ".msg"
|
4997
|
+
color: "#a0e0a0"
|
4998
|
+
tm_scope: source.msg
|
4999
|
+
ace_mode: text
|
5000
|
+
aliases:
|
5001
|
+
- omnetpp-msg
|
5002
|
+
language_id: 664100008
|
5003
|
+
OMNeT++ NED:
|
5004
|
+
type: programming
|
5005
|
+
extensions:
|
5006
|
+
- ".ned"
|
5007
|
+
color: "#08607c"
|
5008
|
+
tm_scope: source.ned
|
5009
|
+
ace_mode: text
|
5010
|
+
aliases:
|
5011
|
+
- omnetpp-ned
|
5012
|
+
language_id: 924868392
|
4899
5013
|
Oberon:
|
4900
5014
|
type: programming
|
4901
5015
|
extensions:
|
@@ -5122,6 +5236,15 @@ Org:
|
|
5122
5236
|
tm_scope: none
|
5123
5237
|
ace_mode: text
|
5124
5238
|
language_id: 267
|
5239
|
+
OverpassQL:
|
5240
|
+
type: programming
|
5241
|
+
color: "#cce2aa"
|
5242
|
+
wrap: true
|
5243
|
+
extensions:
|
5244
|
+
- ".overpassql"
|
5245
|
+
tm_scope: source.overpassql
|
5246
|
+
ace_mode: text
|
5247
|
+
language_id: 689079655
|
5125
5248
|
Ox:
|
5126
5249
|
type: programming
|
5127
5250
|
extensions:
|
@@ -5835,6 +5958,22 @@ Quake:
|
|
5835
5958
|
ace_mode: text
|
5836
5959
|
tm_scope: source.quake
|
5837
5960
|
language_id: 375265331
|
5961
|
+
QuickBASIC:
|
5962
|
+
type: programming
|
5963
|
+
color: "#008080"
|
5964
|
+
extensions:
|
5965
|
+
- ".bas"
|
5966
|
+
tm_scope: source.QB64
|
5967
|
+
aliases:
|
5968
|
+
- qb
|
5969
|
+
- qbasic
|
5970
|
+
- qb64
|
5971
|
+
- classic qbasic
|
5972
|
+
- classic quickbasic
|
5973
|
+
ace_mode: text
|
5974
|
+
codemirror_mode: vb
|
5975
|
+
codemirror_mime_type: text/x-vb
|
5976
|
+
language_id: 593107205
|
5838
5977
|
R:
|
5839
5978
|
type: programming
|
5840
5979
|
color: "#198CE7"
|
@@ -6522,6 +6661,11 @@ SRecode Template:
|
|
6522
6661
|
SSH Config:
|
6523
6662
|
type: data
|
6524
6663
|
group: INI
|
6664
|
+
aliases:
|
6665
|
+
- sshconfig
|
6666
|
+
- sshdconfig
|
6667
|
+
- ssh_config
|
6668
|
+
- sshd_config
|
6525
6669
|
filenames:
|
6526
6670
|
- ssh-config
|
6527
6671
|
- ssh_config
|
@@ -6829,6 +6973,14 @@ Singularity:
|
|
6829
6973
|
- Singularity
|
6830
6974
|
ace_mode: text
|
6831
6975
|
language_id: 987024632
|
6976
|
+
Slang:
|
6977
|
+
type: programming
|
6978
|
+
color: "#1fbec9"
|
6979
|
+
extensions:
|
6980
|
+
- ".slang"
|
6981
|
+
tm_scope: source.slang
|
6982
|
+
ace_mode: text
|
6983
|
+
language_id: 239357863
|
6832
6984
|
Slash:
|
6833
6985
|
type: programming
|
6834
6986
|
color: "#007eff"
|
@@ -7013,6 +7165,7 @@ Starlark:
|
|
7013
7165
|
- Tiltfile
|
7014
7166
|
- WORKSPACE
|
7015
7167
|
- WORKSPACE.bazel
|
7168
|
+
- WORKSPACE.bzlmod
|
7016
7169
|
aliases:
|
7017
7170
|
- bazel
|
7018
7171
|
- bzl
|
@@ -7077,6 +7230,14 @@ SuperCollider:
|
|
7077
7230
|
tm_scope: source.supercollider
|
7078
7231
|
ace_mode: text
|
7079
7232
|
language_id: 361
|
7233
|
+
Survex data:
|
7234
|
+
type: data
|
7235
|
+
color: "#ffcc99"
|
7236
|
+
tm_scope: none
|
7237
|
+
ace_mode: text
|
7238
|
+
extensions:
|
7239
|
+
- ".svx"
|
7240
|
+
language_id: 24470517
|
7080
7241
|
Svelte:
|
7081
7242
|
type: markup
|
7082
7243
|
color: "#ff3e00"
|
@@ -7170,6 +7331,16 @@ TOML:
|
|
7170
7331
|
codemirror_mode: toml
|
7171
7332
|
codemirror_mime_type: text/x-toml
|
7172
7333
|
language_id: 365
|
7334
|
+
TSPLIB data:
|
7335
|
+
aliases:
|
7336
|
+
- travelling salesman problem
|
7337
|
+
- traveling salesman problem
|
7338
|
+
type: data
|
7339
|
+
extensions:
|
7340
|
+
- ".tsp"
|
7341
|
+
tm_scope: none
|
7342
|
+
ace_mode: text
|
7343
|
+
language_id: 89289301
|
7173
7344
|
TSQL:
|
7174
7345
|
type: programming
|
7175
7346
|
color: "#e38c00"
|
@@ -7208,6 +7379,14 @@ TXL:
|
|
7208
7379
|
tm_scope: source.txl
|
7209
7380
|
ace_mode: text
|
7210
7381
|
language_id: 366
|
7382
|
+
Tact:
|
7383
|
+
type: programming
|
7384
|
+
color: "#48b5ff"
|
7385
|
+
extensions:
|
7386
|
+
- ".tact"
|
7387
|
+
ace_mode: text
|
7388
|
+
tm_scope: source.tact
|
7389
|
+
language_id: 606708469
|
7211
7390
|
Talon:
|
7212
7391
|
type: programming
|
7213
7392
|
ace_mode: text
|
@@ -7410,6 +7589,16 @@ Toit:
|
|
7410
7589
|
tm_scope: source.toit
|
7411
7590
|
ace_mode: text
|
7412
7591
|
language_id: 356554395
|
7592
|
+
Tree-sitter Query:
|
7593
|
+
type: programming
|
7594
|
+
color: "#8ea64c"
|
7595
|
+
aliases:
|
7596
|
+
- tsq
|
7597
|
+
extensions:
|
7598
|
+
- ".scm"
|
7599
|
+
tm_scope: source.scm
|
7600
|
+
ace_mode: text
|
7601
|
+
language_id: 436081647
|
7413
7602
|
Turing:
|
7414
7603
|
type: programming
|
7415
7604
|
color: "#cf142b"
|
@@ -7453,6 +7642,7 @@ TypeScript:
|
|
7453
7642
|
aliases:
|
7454
7643
|
- ts
|
7455
7644
|
interpreters:
|
7645
|
+
- bun
|
7456
7646
|
- deno
|
7457
7647
|
- ts-node
|
7458
7648
|
- tsx
|
@@ -7465,6 +7655,16 @@ TypeScript:
|
|
7465
7655
|
codemirror_mode: javascript
|
7466
7656
|
codemirror_mime_type: application/typescript
|
7467
7657
|
language_id: 378
|
7658
|
+
TypeSpec:
|
7659
|
+
type: programming
|
7660
|
+
color: "#4A3665"
|
7661
|
+
aliases:
|
7662
|
+
- tsp
|
7663
|
+
extensions:
|
7664
|
+
- ".tsp"
|
7665
|
+
tm_scope: source.tsp
|
7666
|
+
ace_mode: text
|
7667
|
+
language_id: 952272597
|
7468
7668
|
Typst:
|
7469
7669
|
type: programming
|
7470
7670
|
color: "#239dad"
|
@@ -7755,7 +7955,7 @@ Vue:
|
|
7755
7955
|
color: "#41b883"
|
7756
7956
|
extensions:
|
7757
7957
|
- ".vue"
|
7758
|
-
tm_scope:
|
7958
|
+
tm_scope: source.vue
|
7759
7959
|
ace_mode: html
|
7760
7960
|
language_id: 391
|
7761
7961
|
Vyper:
|
@@ -8040,6 +8240,7 @@ XML:
|
|
8040
8240
|
- ".glade"
|
8041
8241
|
- ".gml"
|
8042
8242
|
- ".gmx"
|
8243
|
+
- ".gpx"
|
8043
8244
|
- ".grxml"
|
8044
8245
|
- ".gst"
|
8045
8246
|
- ".hzp"
|
@@ -8203,6 +8404,14 @@ XSLT:
|
|
8203
8404
|
codemirror_mime_type: text/xml
|
8204
8405
|
color: "#EB8CEB"
|
8205
8406
|
language_id: 404
|
8407
|
+
Xmake:
|
8408
|
+
type: programming
|
8409
|
+
color: "#22a079"
|
8410
|
+
filenames:
|
8411
|
+
- xmake.lua
|
8412
|
+
tm_scope: source.xmake
|
8413
|
+
ace_mode: text
|
8414
|
+
language_id: 225223071
|
8206
8415
|
Xojo:
|
8207
8416
|
type: programming
|
8208
8417
|
color: "#81bd41"
|
@@ -8254,9 +8463,11 @@ YAML:
|
|
8254
8463
|
filenames:
|
8255
8464
|
- ".clang-format"
|
8256
8465
|
- ".clang-tidy"
|
8466
|
+
- ".clangd"
|
8257
8467
|
- ".gemrc"
|
8258
8468
|
- CITATION.cff
|
8259
8469
|
- glide.lock
|
8470
|
+
- pixi.lock
|
8260
8471
|
- yarn.lock
|
8261
8472
|
ace_mode: yaml
|
8262
8473
|
codemirror_mode: yaml
|
@@ -8504,6 +8715,17 @@ mcfunction:
|
|
8504
8715
|
tm_scope: source.mcfunction
|
8505
8716
|
ace_mode: text
|
8506
8717
|
language_id: 462488745
|
8718
|
+
mdsvex:
|
8719
|
+
type: markup
|
8720
|
+
color: "#5f9ea0"
|
8721
|
+
tm_scope: none
|
8722
|
+
ace_mode: markdown
|
8723
|
+
codemirror_mode: gfm
|
8724
|
+
codemirror_mime_type: text/x-gfm
|
8725
|
+
wrap: true
|
8726
|
+
extensions:
|
8727
|
+
- ".svx"
|
8728
|
+
language_id: 566198445
|
8507
8729
|
mupad:
|
8508
8730
|
type: programming
|
8509
8731
|
color: "#244963"
|
data/lib/linguist/lazy_blob.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'linguist/blob_helper'
|
2
2
|
require 'linguist/language'
|
3
|
-
require '
|
3
|
+
require 'linguist/source/repository'
|
4
|
+
require 'linguist/source/rugged'
|
4
5
|
|
5
6
|
module Linguist
|
6
7
|
class LazyBlob
|
@@ -10,8 +11,11 @@ module Linguist
|
|
10
11
|
'linguist-generated',
|
11
12
|
'linguist-detectable']
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
# DEPRECATED: use Linguist::Source::RuggedRepository::GIT_ATTR_OPTS instead
|
15
|
+
GIT_ATTR_OPTS = Linguist::Source::RuggedRepository::GIT_ATTR_OPTS
|
16
|
+
|
17
|
+
# DEPRECATED: use Linguist::Source::RuggedRepository::GIT_ATTR_FLAGS instead
|
18
|
+
GIT_ATTR_FLAGS = Linguist::Source::RuggedRepository::GIT_ATTR_FLAGS
|
15
19
|
|
16
20
|
include BlobHelper
|
17
21
|
|
@@ -25,7 +29,12 @@ module Linguist
|
|
25
29
|
alias :name :path
|
26
30
|
|
27
31
|
def initialize(repo, oid, path, mode = nil)
|
28
|
-
@repository = repo
|
32
|
+
@repository = if repo.is_a? Linguist::Source::Repository
|
33
|
+
repo
|
34
|
+
else
|
35
|
+
# Allow this for backward-compatibility purposes
|
36
|
+
Linguist::Source::RuggedRepository.new(repo)
|
37
|
+
end
|
29
38
|
@oid = oid
|
30
39
|
@path = path
|
31
40
|
@mode = mode
|
@@ -33,8 +42,7 @@ module Linguist
|
|
33
42
|
end
|
34
43
|
|
35
44
|
def git_attributes
|
36
|
-
@git_attributes ||= repository.
|
37
|
-
name, GIT_ATTR, GIT_ATTR_FLAGS)
|
45
|
+
@git_attributes ||= repository.load_attributes_for_path(name, GIT_ATTR)
|
38
46
|
end
|
39
47
|
|
40
48
|
def documentation?
|
@@ -106,7 +114,7 @@ module Linguist
|
|
106
114
|
end
|
107
115
|
|
108
116
|
def load_blob!
|
109
|
-
@data, @size =
|
117
|
+
@data, @size = repository.load_blob(oid, MAX_SIZE) if @data.nil?
|
110
118
|
end
|
111
119
|
end
|
112
120
|
end
|
data/lib/linguist/repository.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'linguist/lazy_blob'
|
2
|
-
require '
|
2
|
+
require 'linguist/source/repository'
|
3
|
+
require 'linguist/source/rugged'
|
3
4
|
|
4
5
|
module Linguist
|
5
6
|
# A Repository is an abstraction of a Grit::Repo or a basic file
|
@@ -23,14 +24,19 @@ module Linguist
|
|
23
24
|
# Public: Initialize a new Repository to be analyzed for language
|
24
25
|
# data
|
25
26
|
#
|
26
|
-
# repo - a
|
27
|
+
# repo - a Linguist::Source::Repository object
|
27
28
|
# commit_oid - the sha1 of the commit that will be analyzed;
|
28
29
|
# this is usually the master branch
|
29
30
|
# max_tree_size - the maximum tree size to consider for analysis (default: MAX_TREE_SIZE)
|
30
31
|
#
|
31
32
|
# Returns a Repository
|
32
33
|
def initialize(repo, commit_oid, max_tree_size = MAX_TREE_SIZE)
|
33
|
-
@repository = repo
|
34
|
+
@repository = if repo.is_a? Linguist::Source::Repository
|
35
|
+
repo
|
36
|
+
else
|
37
|
+
# Allow this for backward-compatibility purposes
|
38
|
+
Linguist::Source::RuggedRepository.new(repo)
|
39
|
+
end
|
34
40
|
@commit_oid = commit_oid
|
35
41
|
@max_tree_size = max_tree_size
|
36
42
|
|
@@ -123,26 +129,25 @@ module Linguist
|
|
123
129
|
end
|
124
130
|
|
125
131
|
def read_index
|
126
|
-
|
127
|
-
|
128
|
-
repository.index = attr_index
|
132
|
+
raise NotImplementedError, "read_index is deprecated" unless repository.is_a? Linguist::Source::RuggedRepository
|
133
|
+
repository.set_attribute_source(@commit_oid)
|
129
134
|
end
|
130
135
|
|
131
136
|
def current_tree
|
132
|
-
|
137
|
+
raise NotImplementedError, "current_tree is deprecated" unless repository.is_a? Linguist::Source::RuggedRepository
|
138
|
+
repository.get_tree(@commit_oid)
|
133
139
|
end
|
134
140
|
|
135
141
|
protected
|
136
142
|
def compute_stats(old_commit_oid, cache = nil)
|
137
|
-
return {} if
|
143
|
+
return {} if repository.get_tree_size(@commit_oid, @max_tree_size) >= @max_tree_size
|
138
144
|
|
139
|
-
|
140
|
-
|
141
|
-
diff = Rugged::Tree.diff(repository, old_tree, current_tree)
|
145
|
+
repository.set_attribute_source(@commit_oid)
|
146
|
+
diff = repository.diff(old_commit_oid, @commit_oid)
|
142
147
|
|
143
148
|
# Clear file map and fetch full diff if any .gitattributes files are changed
|
144
149
|
if cache && diff.each_delta.any? { |delta| File.basename(delta.new_file[:path]) == ".gitattributes" }
|
145
|
-
diff =
|
150
|
+
diff = repository.diff(nil, @commit_oid)
|
146
151
|
file_map = {}
|
147
152
|
else
|
148
153
|
file_map = cache ? cache.dup : {}
|
@@ -153,7 +158,7 @@ module Linguist
|
|
153
158
|
new = delta.new_file[:path]
|
154
159
|
|
155
160
|
file_map.delete(old)
|
156
|
-
next if delta.binary
|
161
|
+
next if delta.binary?
|
157
162
|
|
158
163
|
if [:added, :modified].include? delta.status
|
159
164
|
# Skip submodules and symlinks
|