2 Commits

Author SHA1 Message Date
df88047ca8 v0.6.1 2024-08-24 21:45:57 -03:00
5a3b50d7a3 Integrate heuristics into lexer selection 2024-08-24 21:39:39 -03:00
4 changed files with 17 additions and 17 deletions

View File

@ -29,7 +29,7 @@ This only covers the RegexLexers, which are the most common ones,
but it means the supported languages are a subset of Chroma's, which
is a subset of Pygments'.
Currently Tartrazine supports ... 248 languages.
Currently Tartrazine supports ... 247 languages.
It has 331 themes (63 from Chroma, the rest are base16 themes via
[Sixteen](https://github.com/ralsina/sixteen)

View File

@ -52,6 +52,6 @@ with open("src/constants/lexers.cr", "w") as f:
f.write(" LEXERS_BY_FILENAME = {\n")
for k in sorted(lexer_by_filename.keys()):
v = lexer_by_filename[k]
f.write(f'"{k}" => {str(list(v)).replace("'", "\"")}, \n')
f.write(f'"{k}" => {str(sorted(list(v))).replace("'", "\"")}, \n')
f.write("}\n")
f.write("end\n")

View File

@ -1,5 +1,5 @@
name: tartrazine
version: 0.6.0
version: 0.6.1
authors:
- Roberto Alsina <roberto.alsina@gmail.com>

View File

@ -731,8 +731,8 @@ module Tartrazine
"*.applescript" => ["applescript"],
"*.aql" => ["arangodb_aql"],
"*.arexx" => ["rexx"],
"*.as" => ["actionscript_3", "actionscript"],
"*.asm" => ["nasm", "z80_assembly", "tasm"],
"*.as" => ["actionscript", "actionscript_3"],
"*.asm" => ["nasm", "tasm", "z80_assembly"],
"*.au3" => ["autoit"],
"*.automount" => ["systemd"],
"*.aux" => ["tex"],
@ -740,7 +740,7 @@ module Tartrazine
"*.awk" => ["awk"],
"*.b" => ["brainfuck"],
"*.bal" => ["ballerina"],
"*.bas" => ["vb_net", "qbasic"],
"*.bas" => ["qbasic", "vb_net"],
"*.bash" => ["bash"],
"*.bat" => ["batchfile"],
"*.batch" => ["psl"],
@ -850,7 +850,7 @@ module Tartrazine
"*.graphql" => ["graphql"],
"*.graphqls" => ["graphql"],
"*.groovy" => ["groovy"],
"*.h" => ["objective-c", "c", "c++"],
"*.h" => ["c", "c++", "objective-c"],
"*.h++" => ["c++"],
"*.ha" => ["hare"],
"*.handlebars" => ["handlebars"],
@ -873,7 +873,7 @@ module Tartrazine
"*.idc" => ["c"],
"*.idr" => ["idris"],
"*.ijs" => ["j"],
"*.inc" => ["php", "objectpascal", "povray", "sourcepawn"],
"*.inc" => ["objectpascal", "php", "povray", "sourcepawn"],
"*.inf" => ["ini"],
"*.ini" => ["ini"],
"*.ino" => ["arduino"],
@ -899,7 +899,7 @@ module Tartrazine
"*.lpk" => ["objectpascal"],
"*.lpr" => ["objectpascal"],
"*.lua" => ["lua"],
"*.m" => ["mathematica", "mason", "octave", "objective-c", "matlab"],
"*.m" => ["mason", "mathematica", "matlab", "objective-c", "octave"],
"*.ma" => ["mathematica"],
"*.mak" => ["makefile"],
"*.man" => ["groff"],
@ -954,7 +954,7 @@ module Tartrazine
"*.php" => ["php"],
"*.php[345]" => ["php"],
"*.pig" => ["pig"],
"*.pl" => ["prolog", "perl"],
"*.pl" => ["perl", "prolog"],
"*.plc" => ["plutus_core"],
"*.plot" => ["gnuplot"],
"*.plt" => ["gnuplot"],
@ -962,7 +962,7 @@ module Tartrazine
"*.pml" => ["promela"],
"*.pony" => ["pony"],
"*.pov" => ["povray"],
"*.pp" => ["puppet", "objectpascal"],
"*.pp" => ["objectpascal", "puppet"],
"*.pq" => ["powerquery"],
"*.pr" => ["promela"],
"*.prm" => ["promela"],
@ -1011,7 +1011,7 @@ module Tartrazine
"*.rst" => ["rst"],
"*.rvt" => ["tcl"],
"*.rx" => ["rexx"],
"*.s" => ["armasm", "r", "gas"],
"*.s" => ["armasm", "gas", "r"],
"*.sage" => ["python"],
"*.sas" => ["sas"],
"*.sass" => ["sass"],
@ -1024,7 +1024,7 @@ module Tartrazine
"*.scope" => ["systemd"],
"*.scss" => ["scss"],
"*.sed" => ["sed"],
"*.service" => ["systemd", "ini"],
"*.service" => ["ini", "systemd"],
"*.sh" => ["bash"],
"*.sh-session" => ["bash_session"],
"*.sieve" => ["sieve"],
@ -1034,13 +1034,13 @@ module Tartrazine
"*.smali" => ["smali"],
"*.sml" => ["standard_ml"],
"*.snobol" => ["snobol"],
"*.socket" => ["systemd", "ini"],
"*.socket" => ["ini", "systemd"],
"*.sol" => ["solidity"],
"*.sp" => ["sourcepawn"],
"*.sparql" => ["sparql"],
"*.spec" => ["rpm_spec"],
"*.spt" => ["cheetah"],
"*.sql" => ["sql", "mysql"],
"*.sql" => ["mysql", "sql"],
"*.ss" => ["scheme"],
"*.st" => ["smalltalk"],
"*.stas" => ["stas"],
@ -1069,7 +1069,7 @@ module Tartrazine
"*.tpl" => ["smarty"],
"*.tpp" => ["c++"],
"*.trig" => ["psl"],
"*.ts" => ["typoscript", "typescript"],
"*.ts" => ["typescript", "typoscript"],
"*.tst" => ["scilab"],
"*.tsx" => ["typescript"],
"*.ttl" => ["turtle"],
@ -1079,7 +1079,7 @@ module Tartrazine
"*.twig" => ["twig"],
"*.txt" => ["plaintext"],
"*.uc" => ["ucode"],
"*.v" => ["verilog", "v", "coq"],
"*.v" => ["coq", "v", "verilog"],
"*.vala" => ["vala"],
"*.vapi" => ["vala"],
"*.vb" => ["vb_net"],