From b63660ba3c48a22e03a121ecc52151823374b83c Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Sun, 3 Feb 2019 12:25:47 +0100 Subject: [PATCH] Updated Lexer List --- dpaste/apps.py | 456 ++++++++++++++++++++++++++++++++++++++++++++----- setup.cfg | 3 - 2 files changed, 418 insertions(+), 41 deletions(-) diff --git a/dpaste/apps.py b/dpaste/apps.py index dc2662e..38e455e 100644 --- a/dpaste/apps.py +++ b/dpaste/apps.py @@ -118,81 +118,461 @@ class dpasteAppConfig(AppConfig): Lexer Highlight Class) If the Highlight Class is not given, PygmentsHighlighter is used. + + To get a current list of available lexers in Pygements do: + + >>> from pygments import lexers + >>> sorted([(i[1][0], i[0]) for i in lexers.get_all_lexers()]) + [('abap', 'ABAP'), + ('abnf', 'ABNF'), + ('ada', 'Ada'), + ... """ - from dpaste.highlight import PlainCodeHighlighter, SolidityHighlighter + from dpaste.highlight import PlainCodeHighlighter return [ (self.PLAIN_CODE_SYMBOL, 'Plain Code', PlainCodeHighlighter), - ('abap', 'ABAP'), - ('apacheconf', 'ApacheConf'), + # ('abap', 'ABAP'), + # ('abnf', 'ABNF'), + # ('ada', 'Ada'), + # ('adl', 'ADL'), + # ('agda', 'Agda'), + # ('aheui', 'Aheui'), + # ('ahk', 'autohotkey'), + # ('alloy', 'Alloy'), + # ('ampl', 'Ampl'), + # ('antlr', 'ANTLR'), + # ('antlr-as', 'ANTLR With ActionScript Target'), + # ('antlr-cpp', 'ANTLR With CPP Target'), + # ('antlr-csharp', 'ANTLR With C# Target'), + # ('antlr-java', 'ANTLR With Java Target'), + # ('antlr-objc', 'ANTLR With ObjectiveC Target'), + # ('antlr-perl', 'ANTLR With Perl Target'), + # ('antlr-python', 'ANTLR With Python Target'), + # ('antlr-ruby', 'ANTLR With Ruby Target'), + # ('apacheconf', 'ApacheConf'), + # ('apl', 'APL'), ('applescript', 'AppleScript'), - ('as', 'ActionScript'), + ('arduino', 'Arduino'), + # ('as', 'ActionScript'), + # ('as3', 'ActionScript 3'), + # ('aspectj', 'AspectJ'), + # ('aspx-cs', 'aspx-cs'), + # ('aspx-vb', 'aspx-vb'), + # ('asy', 'Asymptote'), + # ('at', 'AmbientTalk'), + # ('autoit', 'AutoIt'), + # ('awk', 'Awk'), + # ('basemake', 'Base Makefile'), ('bash', 'Bash'), - ('bbcode', 'BBCode'), + ('bat', 'Batchfile'), + # ('bbcode', 'BBCode'), + # ('bc', 'BC'), + # ('befunge', 'Befunge'), + # ('bib', 'BibTeX'), + # ('blitzbasic', 'BlitzBasic'), + # ('blitzmax', 'BlitzMax'), + # ('bnf', 'BNF'), + # ('boo', 'Boo'), + # ('boogie', 'Boogie'), + # ('brainfuck', 'Brainfuck'), + # ('bro', 'Bro'), + # ('bst', 'BST'), + # ('bugs', 'BUGS'), ('c', 'C'), - ('cpp', 'C++'), + # ('c-objdump', 'c-objdump'), + # ('ca65', 'ca65 assembler'), + # ('cadl', 'cADL'), + # ('camkes', 'CAmkES'), + # ('capdl', 'CapDL'), + # ('capnp', "Cap'n Proto"), + # ('cbmbas', 'CBM BASIC V2'), + # ('ceylon', 'Ceylon'), + # ('cfc', 'Coldfusion CFC'), + # ('cfengine3', 'CFEngine3'), + # ('cfm', 'Coldfusion HTML'), + # ('cfs', 'cfstatement'), + # ('chai', 'ChaiScript'), + # ('chapel', 'Chapel'), + # ('cheetah', 'Cheetah'), + # ('cirru', 'Cirru'), + # ('clay', 'Clay'), + # ('clean', 'Clean'), ('clojure', 'Clojure'), - ('cobol', 'COBOL'), + # ('clojurescript', 'ClojureScript'), + ('cmake', 'CMake'), + # ('cobol', 'COBOL'), + # ('cobolfree', 'COBOLFree'), + ('coffee-script', 'CoffeeScript'), + ('common-lisp', 'Common Lisp'), + # ('componentpascal', 'Component Pascal'), + ('console', 'Console/Bash Session'), + # ('control', 'Debian Control file'), + # ('coq', 'Coq'), + # ('cpp', 'C++'), + # ('cpp-objdump', 'cpp-objdump'), + # ('cpsa', 'CPSA'), + # ('cr', 'Crystal'), + # ('crmsh', 'Crmsh'), + # ('croc', 'Croc'), + # ('cryptol', 'Cryptol'), + ('csharp', 'C#'), + # ('csound', 'Csound Orchestra'), + # ('csound-document', 'Csound Document'), + # ('csound-score', 'Csound Score'), ('css', 'CSS'), + # ('css+django', 'CSS+Django/Jinja'), + # ('css+erb', 'CSS+Ruby'), + # ('css+genshitext', 'CSS+Genshi Text'), + # ('css+lasso', 'CSS+Lasso'), + # ('css+mako', 'CSS+Mako'), + # ('css+mozpreproc', 'CSS+mozpreproc'), + # ('css+myghty', 'CSS+Myghty'), + # ('css+php', 'CSS+PHP'), + # ('css+smarty', 'CSS+Smarty'), + # ('cucumber', 'Gherkin'), ('cuda', 'CUDA'), + # ('cypher', 'Cypher'), + # ('cython', 'Cython'), + # ('d', 'D'), + # ('d-objdump', 'd-objdump'), ('dart', 'Dart'), ('delphi', 'Delphi'), + # ('dg', 'dg'), ('diff', 'Diff'), - ('django', 'Django'), + ('django', 'Django/Jinja'), + ('docker', 'Docker'), + # ('doscon', 'MSDOS Session'), + # ('dpatch', 'Darcs Patch'), + # ('dtd', 'DTD'), + # ('duel', 'Duel'), + # ('dylan', 'Dylan'), + # ('dylan-console', 'Dylan session'), + # ('dylan-lid', 'DylanLID'), + # ('earl-grey', 'Earl Grey'), + # ('easytrieve', 'Easytrieve'), + # ('ebnf', 'EBNF'), + # ('ec', 'eC'), + # ('ecl', 'ECL'), + # ('eiffel', 'Eiffel'), + ('elixir', 'Elixir'), + # ('elm', 'Elm'), + # ('emacs', 'EmacsLisp'), + # ('erb', 'ERB'), + # ('erl', 'Erlang erl session'), ('erlang', 'Erlang'), - ('fortran', 'Fortran'), + # ('evoque', 'Evoque'), + # ('extempore', 'xtlang'), + # ('ezhil', 'Ezhil'), + # ('factor', 'Factor'), + # ('fan', 'Fantom'), + # ('fancy', 'Fancy'), + # ('felix', 'Felix'), + # ('fennel', 'Fennel'), + # ('fish', 'Fish'), + # ('flatline', 'Flatline'), + # ('forth', 'Forth'), + # ('fortran', 'Fortran'), + # ('fortranfixed', 'FortranFixed'), + # ('foxpro', 'FoxPro'), + # ('fsharp', 'FSharp'), + # ('gap', 'GAP'), + # ('gas', 'GAS'), + # ('genshi', 'Genshi'), + # ('genshitext', 'Genshi Text'), + # ('glsl', 'GLSL'), + # ('gnuplot', 'Gnuplot'), ('go', 'Go'), - ('groovy', 'Groovy'), - ('haml', 'Haml'), + # ('golo', 'Golo'), + # ('gooddata-cl', 'GoodData-CL'), + # ('gosu', 'Gosu'), + # ('groff', 'Groff'), + # ('groovy', 'Groovy'), + # ('gst', 'Gosu Template'), + # ('haml', 'Haml'), + ('handlebars', 'Handlebars'), ('haskell', 'Haskell'), + # ('haxeml', 'Hxml'), + # ('hexdump', 'Hexdump'), + # ('hlsl', 'HLSL'), + # ('hsail', 'HSAIL'), ('html', 'HTML'), - ('http', 'HTTP'), + # ('html+cheetah', 'HTML+Cheetah'), + ('html+django', 'HTML + Django/Jinja'), + # ('html+evoque', 'HTML+Evoque'), + # ('html+genshi', 'HTML+Genshi'), + # ('html+handlebars', 'HTML+Handlebars'), + # ('html+lasso', 'HTML+Lasso'), + # ('html+mako', 'HTML+Mako'), + # ('html+myghty', 'HTML+Myghty'), + # ('html+ng2', 'HTML + Angular2'), + # ('html+php', 'HTML+PHP'), + # ('html+smarty', 'HTML+Smarty'), + # ('html+twig', 'HTML+Twig'), + # ('html+velocity', 'HTML+Velocity'), + # ('http', 'HTTP'), + # ('hx', 'Haxe'), + # ('hybris', 'Hybris'), + # ('hylang', 'Hy'), + # ('i6t', 'Inform 6 template'), + # ('idl', 'IDL'), + # ('idris', 'Idris'), + # ('iex', 'Elixir iex session'), + # ('igor', 'Igor'), + # ('inform6', 'Inform 6'), + # ('inform7', 'Inform 7'), ('ini', 'INI'), - ('irc', 'IRC'), + # ('io', 'Io'), + # ('ioke', 'Ioke'), + # ('ipython2', 'IPython'), + # ('ipython3', 'IPython3'), + ('ipythonconsole', 'IPython console session'), + ('irc', 'IRC logs'), + # ('isabelle', 'Isabelle'), + # ('j', 'J'), + # ('jags', 'JAGS'), + # ('jasmin', 'Jasmin'), ('java', 'Java'), + # ('javascript+mozpreproc', 'Javascript+mozpreproc'), + # ('jcl', 'JCL'), + # ('jlcon', 'Julia console'), ('js', 'JavaScript'), - ('json', 'JSON'), + # ('js+cheetah', 'JavaScript+Cheetah'), + # ('js+django', 'JavaScript+Django/Jinja'), + # ('js+erb', 'JavaScript+Ruby'), + # ('js+genshitext', 'JavaScript+Genshi Text'), + # ('js+lasso', 'JavaScript+Lasso'), + # ('js+mako', 'JavaScript+Mako'), + # ('js+myghty', 'JavaScript+Myghty'), + # ('js+php', 'JavaScript+PHP'), + # ('js+smarty', 'JavaScript+Smarty'), + # ('jsgf', 'JSGF'), + # ('json', 'JSON'), + # ('json-object', 'JSONBareObject'), + # ('jsonld', 'JSON-LD'), + # ('jsp', 'Java Server Page'), + # ('julia', 'Julia'), + # ('juttle', 'Juttle'), + # ('kal', 'Kal'), + # ('kconfig', 'Kconfig'), + # ('koka', 'Koka'), + ('kotlin', 'Kotlin'), + # ('lagda', 'Literate Agda'), + # ('lasso', 'Lasso'), + # ('lcry', 'Literate Cryptol'), + # ('lean', 'Lean'), + ('less', 'LessCSS'), + # ('lhs', 'Literate Haskell'), + # ('lidr', 'Literate Idris'), + # ('lighty', 'Lighttpd configuration file'), + # ('limbo', 'Limbo'), + # ('liquid', 'liquid'), + # ('live-script', 'LiveScript'), + # ('llvm', 'LLVM'), + # ('logos', 'Logos'), + # ('logtalk', 'Logtalk'), + # ('lsl', 'LSL'), ('lua', 'Lua'), ('make', 'Makefile'), - ('mako', 'Mako'), - ('mason', 'Mason'), + # ('mako', 'Mako'), + # ('maql', 'MAQL'), + # ('mask', 'Mask'), + # ('mason', 'Mason'), + # ('mathematica', 'Mathematica'), ('matlab', 'Matlab'), - ('modula2', 'Modula'), - ('monkey', 'Monkey'), - ('mysql', 'MySQL'), + # ('matlabsession', 'Matlab session'), + # ('md', 'markdown'), + # ('minid', 'MiniD'), + # ('modelica', 'Modelica'), + # ('modula2', 'Modula-2'), + # ('monkey', 'Monkey'), + # ('monte', 'Monte'), + # ('moocode', 'MOOCode'), + # ('moon', 'MoonScript'), + # ('mozhashpreproc', 'mozhashpreproc'), + # ('mozpercentpreproc', 'mozpercentpreproc'), + # ('mql', 'MQL'), + # ('mscgen', 'Mscgen'), + # ('mupad', 'MuPAD'), + # ('mxml', 'MXML'), + # ('myghty', 'Myghty'), + # ('mysql', 'MySQL'), + # ('nasm', 'NASM'), + # ('ncl', 'NCL'), + # ('nemerle', 'Nemerle'), + # ('nesc', 'nesC'), + # ('newlisp', 'NewLisp'), + # ('newspeak', 'Newspeak'), + # ('ng2', 'Angular2'), + ('nginx', 'Nginx configuration file'), + # ('nim', 'Nimrod'), + # ('nit', 'Nit'), + # ('nixos', 'Nix'), + # ('nsis', 'NSIS'), ('numpy', 'NumPy'), - ('objc', 'Obj-C'), - ('ocaml', 'OCaml'), + # ('nusmv', 'NuSMV'), + # ('objdump', 'objdump'), + # ('objdump-nasm', 'objdump-nasm'), + ('objective-c', 'Objective-C'), + # ('objective-c++', 'Objective-C++'), + # ('objective-j', 'Objective-J'), + # ('ocaml', 'OCaml'), + # ('octave', 'Octave'), + # ('odin', 'ODIN'), + # ('ooc', 'Ooc'), + # ('opa', 'Opa'), + # ('openedge', 'OpenEdge ABL'), + # ('pacmanconf', 'PacmanConf'), + # ('pan', 'Pan'), + # ('parasail', 'ParaSail'), + # ('pawn', 'Pawn'), ('perl', 'Perl'), + # ('perl6', 'Perl6'), ('php', 'PHP'), - ('postscript', 'PostScript'), - ('powershell', 'PowerShell'), - ('prolog', 'Prolog'), - ('properties', 'Properties'), - ('puppet', 'Puppet'), - ('python', 'Python'), # Default lexer - ('r', 'R'), + # ('pig', 'Pig'), + # ('pike', 'Pike'), + # ('pkgconfig', 'PkgConfig'), + # ('plpgsql', 'PL/pgSQL'), + ('postgresql', 'PostgreSQL SQL dialect'), + # ('postscript', 'PostScript'), + # ('pot', 'Gettext Catalog'), + # ('pov', 'POVRay'), + # ('powershell', 'PowerShell'), + # ('praat', 'Praat'), + # ('prolog', 'Prolog'), + # ('properties', 'Properties'), + # ('protobuf', 'Protocol Buffer'), + # ('ps1con', 'PowerShell Session'), + # ('psql', 'PostgreSQL console (psql)'), + # ('pug', 'Pug'), + # ('puppet', 'Puppet'), + # ('py3tb', 'Python 3.0 Traceback'), + # ('pycon', 'Python console session'), + # ('pypylog', 'PyPy Log'), + # ('pytb', 'Python Traceback'), + ('python', 'Python'), + # ('python3', 'Python 3'), + # ('qbasic', 'QBasic'), + # ('qml', 'QML'), + # ('qvto', 'QVTO'), + # ('racket', 'Racket'), + # ('ragel', 'Ragel'), + # ('ragel-c', 'Ragel in C Host'), + # ('ragel-cpp', 'Ragel in CPP Host'), + # ('ragel-d', 'Ragel in D Host'), + # ('ragel-em', 'Embedded Ragel'), + # ('ragel-java', 'Ragel in Java Host'), + # ('ragel-objc', 'Ragel in Objective C Host'), + # ('ragel-ruby', 'Ragel in Ruby Host'), + # ('raw', 'Raw token data'), ('rb', 'Ruby'), + # ('rbcon', 'Ruby irb session'), + # ('rconsole', 'RConsole'), + # ('rd', 'Rd'), + # ('rebol', 'REBOL'), + # ('red', 'Red'), + # ('redcode', 'Redcode'), + # ('registry', 'reg'), + # ('resource', 'ResourceBundle'), + # ('rexx', 'Rexx'), + # ('rhtml', 'RHTML'), + # ('rnc', 'Relax-NG Compact'), + # ('roboconf-graph', 'Roboconf Graph'), + # ('roboconf-instances', 'Roboconf Instances'), + # ('robotframework', 'RobotFramework'), + # ('rql', 'RQL'), + # ('rsl', 'RSL'), ('rst', 'reStructuredText'), + # ('rts', 'TrafficScript'), ('rust', 'Rust'), + # ('sas', 'SAS'), ('sass', 'Sass'), - ('scala', 'Scala'), - ('scheme', 'Scheme'), - ('scilab', 'Scilab'), + # ('sc', 'SuperCollider'), + # ('scala', 'Scala'), + # ('scaml', 'Scaml'), + # ('scheme', 'Scheme'), + # ('scilab', 'Scilab'), ('scss', 'SCSS'), - ('smalltalk', 'Smalltalk'), - ('smarty', 'Smarty'), - ('solidity', 'Solidity', SolidityHighlighter), + # ('shen', 'Shen'), + # ('silver', 'Silver'), + # ('slim', 'Slim'), + # ('smali', 'Smali'), + # ('smalltalk', 'Smalltalk'), + # ('smarty', 'Smarty'), + # ('sml', 'Standard ML'), + # ('snobol', 'Snobol'), + # ('snowball', 'Snowball'), + ('sol', 'Solidity'), + # ('sourceslist', 'Debian Sourcelist'), + # ('sp', 'SourcePawn'), + # ('sparql', 'SPARQL'), + # ('spec', 'RPMSpec'), + # ('splus', 'S'), ('sql', 'SQL'), - ('tcl', 'Tcl'), - ('tcsh', 'Tcsh'), + # ('sqlite3', 'sqlite3con'), + # ('squidconf', 'SquidConf'), + # ('ssp', 'Scalate Server Page'), + # ('stan', 'Stan'), + # ('stata', 'Stata'), + ('swift', 'Swift'), + # ('swig', 'SWIG'), + # ('systemverilog', 'systemverilog'), + # ('tads3', 'TADS 3'), + # ('tap', 'TAP'), + # ('tasm', 'TASM'), + # ('tcl', 'Tcl'), + # ('tcsh', 'Tcsh'), + # ('tcshcon', 'Tcsh Session'), + # ('tea', 'Tea'), + # ('termcap', 'Termcap'), + # ('terminfo', 'Terminfo'), + # ('terraform', 'Terraform'), ('tex', 'TeX'), - ('vb.net', 'VB.net'), + # ('text', 'Text only'), + # ('thrift', 'Thrift'), + # ('todotxt', 'Todotxt'), + # ('trac-wiki', 'MoinMoin/Trac Wiki markup'), + # ('treetop', 'Treetop'), + # ('ts', 'TypeScript'), + # ('tsql', 'Transact-SQL'), + # ('turtle', 'Turtle'), + # ('twig', 'Twig'), + ('typoscript', 'TypoScript'), + # ('typoscriptcssdata', 'TypoScriptCssData'), + # ('typoscripthtmldata', 'TypoScriptHtmlData'), + # ('urbiscript', 'UrbiScript'), + # ('vala', 'Vala'), + # ('vb.net', 'VB.net'), + # ('vcl', 'VCL'), + # ('vclsnippets', 'VCLSnippets'), + # ('vctreestatus', 'VCTreeStatus'), + # ('velocity', 'Velocity'), + # ('verilog', 'verilog'), + # ('vgl', 'VGL'), + # ('vhdl', 'vhdl'), ('vim', 'VimL'), + # ('wdiff', 'WDiff'), + # ('whiley', 'Whiley'), + # ('x10', 'X10'), ('xml', 'XML'), - ('xquery', 'XQuery'), + # ('xml+cheetah', 'XML+Cheetah'), + # ('xml+django', 'XML+Django/Jinja'), + # ('xml+erb', 'XML+Ruby'), + # ('xml+evoque', 'XML+Evoque'), + # ('xml+lasso', 'XML+Lasso'), + # ('xml+mako', 'XML+Mako'), + # ('xml+myghty', 'XML+Myghty'), + # ('xml+php', 'XML+PHP'), + # ('xml+smarty', 'XML+Smarty'), + # ('xml+velocity', 'XML+Velocity'), + # ('xorg.conf', 'Xorg'), + # ('xquery', 'XQuery'), ('xslt', 'XSLT'), + # ('xtend', 'Xtend'), + # ('xul+mozpreproc', 'XUL+mozpreproc'), ('yaml', 'YAML'), + # ('yaml+jinja', 'YAML+Jinja'), + # ('zephir', 'Zephir') ] @staticmethod diff --git a/setup.cfg b/setup.cfg index a1e7512..fd67330 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,9 +38,6 @@ install_requires = django-staticinline>=1.0 django-csp>=3.3 - # Additional Code Lexer - pygments-lexer-solidity>=0.1.0 - # Additional Text Lexer misaka>=2.1.0 docutils