Created
August 31, 2016 22:52
-
-
Save sveetch/e3600bb2ccb7750ed6cad6037639a3f2 to your computer and use it in GitHub Desktop.
Some datas about CodeMirror components used for djangocodemirror dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Some tools to extract datas about codemirror components (modes, themes) | |
This is only designed to developers. You will have to use it like so: :: | |
python extract.py | |
""" | |
import os, json | |
STATIC_DIR = 'static' | |
MODES_SOURCE_DIR = 'CodeMirror/mode' | |
THEMES_SOURCE_DIR = 'CodeMirror/theme' | |
# Taken from "CodeMirror/mode/meta.js" from version "5.18.2" | |
MODES = [ | |
{"name": "APL", "mime":"text/apl", "mode": "apl", "ext": ["dyalog", "apl"]}, | |
{"name": "PGP", "mimes": ["application/pgp", "application/pgp-keys", "application/pgp-signature"], "mode": "asciiarmor", "ext": ["pgp"]}, | |
{"name": "ASN.1", "mime":"text/x-ttcn-asn", "mode": "asn.1", "ext": ["asn", "asn1"]}, | |
{"name": "Asterisk", "mime":"text/x-asterisk", "mode": "asterisk", "file": "/^extensions\.conf$/i"}, | |
{"name": "Brainfuck", "mime":"text/x-brainfuck", "mode": "brainfuck", "ext": ["b", "bf"]}, | |
{"name": "C", "mime":"text/x-csrc", "mode": "clike", "ext": ["c", "h"]}, | |
{"name": "C++", "mime":"text/x-c++src", "mode": "clike", "ext": ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], "alias": ["cpp"]}, | |
{"name": "Cobol", "mime":"text/x-cobol", "mode": "cobol", "ext": ["cob", "cpy"]}, | |
{"name": "C#", "mime":"text/x-csharp", "mode": "clike", "ext": ["cs"], "alias": ["csharp"]}, | |
{"name": "Clojure", "mime":"text/x-clojure", "mode": "clojure", "ext": ["clj", "cljc", "cljx"]}, | |
{"name": "ClojureScript", "mime":"text/x-clojurescript", "mode": "clojure", "ext": ["cljs"]}, | |
{"name": "Closure Stylesheets (GSS)", "mime":"text/x-gss", "mode": "css", "ext": ["gss"]}, | |
{"name": "CMake", "mime":"text/x-cmake", "mode": "cmake", "ext": ["cmake", "cmake.in"], "file": "/^CMakeLists.txt$/"}, | |
{"name": "CoffeeScript", "mime":"text/x-coffeescript", "mode": "coffeescript", "ext": ["coffee"], "alias": ["coffee", "coffee-script"]}, | |
{"name": "Common Lisp", "mime":"text/x-common-lisp", "mode": "commonlisp", "ext": ["cl", "lisp", "el"], "alias": ["lisp"]}, | |
{"name": "Cypher", "mime":"application/x-cypher-query", "mode": "cypher", "ext": ["cyp", "cypher"]}, | |
{"name": "Cython", "mime":"text/x-cython", "mode": "python", "ext": ["pyx", "pxd", "pxi"]}, | |
{"name": "Crystal", "mime":"text/x-crystal", "mode": "crystal", "ext": ["cr"]}, | |
{"name": "CSS", "mime":"text/css", "mode": "css", "ext": ["css"]}, | |
{"name": "CQL", "mime":"text/x-cassandra", "mode": "sql", "ext": ["cql"]}, | |
{"name": "D", "mime":"text/x-d", "mode": "d", "ext": ["d"]}, | |
{"name": "Dart", "mimes": ["application/dart", "text/x-dart"], "mode": "dart", "ext": ["dart"]}, | |
{"name": "diff", "mime":"text/x-diff", "mode": "diff", "ext": ["diff", "patch"]}, | |
{"name": "Django", "mime":"text/x-django", "mode": "django"}, | |
{"name": "Dockerfile", "mime":"text/x-dockerfile", "mode": "dockerfile", "file": "/^Dockerfile$/"}, | |
{"name": "DTD", "mime":"application/xml-dtd", "mode": "dtd", "ext": ["dtd"]}, | |
{"name": "Dylan", "mime":"text/x-dylan", "mode": "dylan", "ext": ["dylan", "dyl", "intr"]}, | |
{"name": "EBNF", "mime":"text/x-ebnf", "mode": "ebnf"}, | |
{"name": "ECL", "mime":"text/x-ecl", "mode": "ecl", "ext": ["ecl"]}, | |
{"name": "edn", "mime":"application/edn", "mode": "clojure", "ext": ["edn"]}, | |
{"name": "Eiffel", "mime":"text/x-eiffel", "mode": "eiffel", "ext": ["e"]}, | |
{"name": "Elm", "mime":"text/x-elm", "mode": "elm", "ext": ["elm"]}, | |
{"name": "Embedded Javascript", "mime":"application/x-ejs", "mode": "htmlembedded", "ext": ["ejs"]}, | |
{"name": "Embedded Ruby", "mime":"application/x-erb", "mode": "htmlembedded", "ext": ["erb"]}, | |
{"name": "Erlang", "mime":"text/x-erlang", "mode": "erlang", "ext": ["erl"]}, | |
{"name": "Factor", "mime":"text/x-factor", "mode": "factor", "ext": ["factor"]}, | |
{"name": "FCL", "mime":"text/x-fcl", "mode": "fcl"}, | |
{"name": "Forth", "mime":"text/x-forth", "mode": "forth", "ext": ["forth", "fth", "4th"]}, | |
{"name": "Fortran", "mime":"text/x-fortran", "mode": "fortran", "ext": ["f", "for", "f77", "f90"]}, | |
{"name": "F#", "mime":"text/x-fsharp", "mode": "mllike", "ext": ["fs"], "alias": ["fsharp"]}, | |
{"name": "Gas", "mime":"text/x-gas", "mode": "gas", "ext": ["s"]}, | |
{"name": "Gherkin", "mime":"text/x-feature", "mode": "gherkin", "ext": ["feature"]}, | |
{"name": "GitHub Flavored Markdown", "mime":"text/x-gfm", "mode": "gfm", "file": "/^(readme|contributing|history).md$/i"}, | |
{"name": "Go", "mime":"text/x-go", "mode": "go", "ext": ["go"]}, | |
{"name": "Groovy", "mime":"text/x-groovy", "mode": "groovy", "ext": ["groovy", "gradle"]}, | |
{"name": "HAML", "mime":"text/x-haml", "mode": "haml", "ext": ["haml"]}, | |
{"name": "Haskell", "mime":"text/x-haskell", "mode": "haskell", "ext": ["hs"]}, | |
{"name": "Haskell (Literate)", "mime":"text/x-literate-haskell", "mode": "haskell-literate", "ext": ["lhs"]}, | |
{"name": "Haxe", "mime":"text/x-haxe", "mode": "haxe", "ext": ["hx"]}, | |
{"name": "HXML", "mime":"text/x-hxml", "mode": "haxe", "ext": ["hxml"]}, | |
{"name": "ASP.NET", "mime":"application/x-aspx", "mode": "htmlembedded", "ext": ["aspx"], "alias": ["asp", "aspx"]}, | |
{"name": "HTML", "mime":"text/html", "mode": "htmlmixed", "ext": ["html", "htm"], "alias": ["xhtml"]}, | |
{"name": "HTTP", "mime":"message/http", "mode": "http"}, | |
{"name": "IDL", "mime":"text/x-idl", "mode": "idl", "ext": ["pro"]}, | |
{"name": "Pug", "mime":"text/x-pug", "mode": "pug", "ext": ["jade", "pug"], "alias": ["jade"]}, | |
{"name": "Java", "mime":"text/x-java", "mode": "clike", "ext": ["java"]}, | |
{"name": "Java Server Pages", "mime":"application/x-jsp", "mode": "htmlembedded", "ext": ["jsp"], "alias": ["jsp"]}, | |
{"name": "JavaScript", "mimes": ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"], "mode": "javascript", "ext": ["js"], "alias": ["ecmascript", "js", "node"]}, | |
{"name": "JSON", "mimes": ["application/json", "application/x-json"], "mode": "javascript", "ext": ["json", "map"], "alias": ["json5"]}, | |
{"name": "JSON-LD", "mime":"application/ld+json", "mode": "javascript", "ext": ["jsonld"], "alias": ["jsonld"]}, | |
{"name": "JSX", "mime":"text/jsx", "mode": "jsx", "ext": ["jsx"]}, | |
{"name": "Jinja2", "mime":"null", "mode": "jinja2"}, | |
{"name": "Julia", "mime":"text/x-julia", "mode": "julia", "ext": ["jl"]}, | |
{"name": "Kotlin", "mime":"text/x-kotlin", "mode": "clike", "ext": ["kt"]}, | |
{"name": "LESS", "mime":"text/x-less", "mode": "css", "ext": ["less"]}, | |
{"name": "LiveScript", "mime":"text/x-livescript", "mode": "livescript", "ext": ["ls"], "alias": ["ls"]}, | |
{"name": "Lua", "mime":"text/x-lua", "mode": "lua", "ext": ["lua"]}, | |
{"name": "Markdown", "mime":"text/x-markdown", "mode": "markdown", "ext": ["markdown", "md", "mkd"]}, | |
{"name": "mIRC", "mime":"text/mirc", "mode": "mirc"}, | |
{"name": "MariaDB SQL", "mime":"text/x-mariadb", "mode": "sql"}, | |
{"name": "Mathematica", "mime":"text/x-mathematica", "mode": "mathematica", "ext": ["m", "nb"]}, | |
{"name": "Modelica", "mime":"text/x-modelica", "mode": "modelica", "ext": ["mo"]}, | |
{"name": "MUMPS", "mime":"text/x-mumps", "mode": "mumps", "ext": ["mps"]}, | |
{"name": "MS SQL", "mime":"text/x-mssql", "mode": "sql"}, | |
{"name": "mbox", "mime":"application/mbox", "mode": "mbox", "ext": ["mbox"]}, | |
{"name": "MySQL", "mime":"text/x-mysql", "mode": "sql"}, | |
{"name": "Nginx", "mime":"text/x-nginx-conf", "mode": "nginx", "file": "/nginx.*\.conf$/i"}, | |
{"name": "NSIS", "mime":"text/x-nsis", "mode": "nsis", "ext": ["nsh", "nsi"]}, | |
{"name": "NTriples", "mime":"text/n-triples", "mode": "ntriples", "ext": ["nt"]}, | |
{"name": "Objective C", "mime":"text/x-objectivec", "mode": "clike", "ext": ["m", "mm"], "alias": ["objective-c", "objc"]}, | |
{"name": "OCaml", "mime":"text/x-ocaml", "mode": "mllike", "ext": ["ml", "mli", "mll", "mly"]}, | |
{"name": "Octave", "mime":"text/x-octave", "mode": "octave", "ext": ["m"]}, | |
{"name": "Oz", "mime":"text/x-oz", "mode": "oz", "ext": ["oz"]}, | |
{"name": "Pascal", "mime":"text/x-pascal", "mode": "pascal", "ext": ["p", "pas"]}, | |
{"name": "PEG.js", "mime":"null", "mode": "pegjs", "ext": ["jsonld"]}, | |
{"name": "Perl", "mime":"text/x-perl", "mode": "perl", "ext": ["pl", "pm"]}, | |
{"name": "PHP", "mime":"application/x-httpd-php", "mode": "php", "ext": ["php", "php3", "php4", "php5", "phtml"]}, | |
{"name": "Pig", "mime":"text/x-pig", "mode": "pig", "ext": ["pig"]}, | |
{"name": "Plain Text", "mime":"text/plain", "mode": "null", "ext": ["txt", "text", "conf", "def", "list", "log"]}, | |
{"name": "PLSQL", "mime":"text/x-plsql", "mode": "sql", "ext": ["pls"]}, | |
{"name": "PowerShell", "mime":"application/x-powershell", "mode": "powershell", "ext": ["ps1", "psd1", "psm1"]}, | |
{"name": "Properties files", "mime":"text/x-properties", "mode": "properties", "ext": ["properties", "ini", "in"], "alias": ["ini", "properties"]}, | |
{"name": "ProtoBuf", "mime":"text/x-protobuf", "mode": "protobuf", "ext": ["proto"]}, | |
{"name": "Python", "mime":"text/x-python", "mode": "python", "ext": ["BUILD", "bzl", "py", "pyw"], "file": "/^(BUCK|BUILD)$/"}, | |
{"name": "Puppet", "mime":"text/x-puppet", "mode": "puppet", "ext": ["pp"]}, | |
{"name": "Q", "mime":"text/x-q", "mode": "q", "ext": ["q"]}, | |
{"name": "R", "mime":"text/x-rsrc", "mode": "r", "ext": ["r"], "alias": ["rscript"]}, | |
{"name": "reStructuredText", "mime":"text/x-rst", "mode": "rst", "ext": ["rst"], "alias": ["rst"]}, | |
{"name": "RPM Changes", "mime":"text/x-rpm-changes", "mode": "rpm"}, | |
{"name": "RPM Spec", "mime":"text/x-rpm-spec", "mode": "rpm", "ext": ["spec"]}, | |
{"name": "Ruby", "mime":"text/x-ruby", "mode": "ruby", "ext": ["rb"], "alias": ["jruby", "macruby", "rake", "rb", "rbx"]}, | |
{"name": "Rust", "mime":"text/x-rustsrc", "mode": "rust", "ext": ["rs"]}, | |
{"name": "SAS", "mime":"text/x-sas", "mode": "sas", "ext": ["sas"]}, | |
{"name": "Sass", "mime":"text/x-sass", "mode": "sass", "ext": ["sass"]}, | |
{"name": "Scala", "mime":"text/x-scala", "mode": "clike", "ext": ["scala"]}, | |
{"name": "Scheme", "mime":"text/x-scheme", "mode": "scheme", "ext": ["scm", "ss"]}, | |
{"name": "SCSS", "mime":"text/x-scss", "mode": "css", "ext": ["scss"]}, | |
{"name": "Shell", "mime":"text/x-sh", "mode": "shell", "ext": ["sh", "ksh", "bash"], "alias": ["bash", "sh", "zsh"], "file": "/^PKGBUILD$/"}, | |
{"name": "Sieve", "mime":"application/sieve", "mode": "sieve", "ext": ["siv", "sieve"]}, | |
{"name": "Slim", "mimes": ["text/x-slim", "application/x-slim"], "mode": "slim", "ext": ["slim"]}, | |
{"name": "Smalltalk", "mime":"text/x-stsrc", "mode": "smalltalk", "ext": ["st"]}, | |
{"name": "Smarty", "mime":"text/x-smarty", "mode": "smarty", "ext": ["tpl"]}, | |
{"name": "Solr", "mime":"text/x-solr", "mode": "solr"}, | |
{"name": "Soy", "mime":"text/x-soy", "mode": "soy", "ext": ["soy"], "alias": ["closure template"]}, | |
{"name": "SPARQL", "mime":"application/sparql-query", "mode": "sparql", "ext": ["rq", "sparql"], "alias": ["sparul"]}, | |
{"name": "Spreadsheet", "mime":"text/x-spreadsheet", "mode": "spreadsheet", "alias": ["excel", "formula"]}, | |
{"name": "SQL", "mime":"text/x-sql", "mode": "sql", "ext": ["sql"]}, | |
{"name": "Squirrel", "mime":"text/x-squirrel", "mode": "clike", "ext": ["nut"]}, | |
{"name": "Swift", "mime":"text/x-swift", "mode": "swift", "ext": ["swift"]}, | |
{"name": "sTeX", "mime":"text/x-stex", "mode": "stex"}, | |
{"name": "LaTeX", "mime":"text/x-latex", "mode": "stex", "ext": ["text", "ltx"], "alias": ["tex"]}, | |
{"name": "SystemVerilog", "mime":"text/x-systemverilog", "mode": "verilog", "ext": ["v"]}, | |
{"name": "Tcl", "mime":"text/x-tcl", "mode": "tcl", "ext": ["tcl"]}, | |
{"name": "Textile", "mime":"text/x-textile", "mode": "textile", "ext": ["textile"]}, | |
{"name": "TiddlyWiki ", "mime":"text/x-tiddlywiki", "mode": "tiddlywiki"}, | |
{"name": "Tiki wiki", "mime":"text/tiki", "mode": "tiki"}, | |
{"name": "TOML", "mime":"text/x-toml", "mode": "toml", "ext": ["toml"]}, | |
{"name": "Tornado", "mime":"text/x-tornado", "mode": "tornado"}, | |
{"name": "troff", "mime":"text/troff", "mode": "troff", "ext": ["1", "2", "3", "4", "5", "6", "7", "8", "9"]}, | |
{"name": "TTCN", "mime":"text/x-ttcn", "mode": "ttcn", "ext": ["ttcn", "ttcn3", "ttcnpp"]}, | |
{"name": "TTCN_CFG", "mime":"text/x-ttcn-cfg", "mode": "ttcn-cfg", "ext": ["cfg"]}, | |
{"name": "Turtle", "mime":"text/turtle", "mode": "turtle", "ext": ["ttl"]}, | |
{"name": "TypeScript", "mime":"application/typescript", "mode": "javascript", "ext": ["ts"], "alias": ["ts"]}, | |
{"name": "Twig", "mime":"text/x-twig", "mode": "twig"}, | |
{"name": "Web IDL", "mime":"text/x-webidl", "mode": "webidl", "ext": ["webidl"]}, | |
{"name": "VB.NET", "mime":"text/x-vb", "mode": "vb", "ext": ["vb"]}, | |
{"name": "VBScript", "mime":"text/vbscript", "mode": "vbscript", "ext": ["vbs"]}, | |
{"name": "Velocity", "mime":"text/velocity", "mode": "velocity", "ext": ["vtl"]}, | |
{"name": "Verilog", "mime":"text/x-verilog", "mode": "verilog", "ext": ["v"]}, | |
{"name": "VHDL", "mime":"text/x-vhdl", "mode": "vhdl", "ext": ["vhd", "vhdl"]}, | |
{"name": "XML", "mimes": ["application/xml", "text/xml"], "mode": "xml", "ext": ["xml", "xsl", "xsd"], "alias": ["rss", "wsdl", "xsd"]}, | |
{"name": "XQuery", "mime":"application/xquery", "mode": "xquery", "ext": ["xy", "xquery"]}, | |
{"name": "Yacas", "mime":"text/x-yacas", "mode": "yacas", "ext": ["ys"]}, | |
{"name": "YAML", "mime":"text/x-yaml", "mode": "yaml", "ext": ["yaml", "yml"], "alias": ["yml"]}, | |
{"name": "Z80", "mime":"text/x-z80", "mode": "z80", "ext": ["z80"]}, | |
{"name": "mscgen", "mime":"text/x-mscgen", "mode": "mscgen", "ext": ["mscgen", "mscin", "msc"]}, | |
{"name": "xu", "mime":"text/x-xu", "mode": "mscgen", "ext": ["xu"]}, | |
{"name": "msgenny", "mime":"text/x-msgenny", "mode": "mscgen", "ext": ["msgenny"]}, | |
] | |
def get_modes(mode_list, source_dir, static_dir): | |
modes = {} | |
for item in mode_list: | |
name = item['name'] | |
filepath = os.path.join(MODES_SOURCE_DIR, name.lower(), "{}.js".format(name.lower())) | |
if not os.path.exists(os.path.join(static_dir)): | |
print "* Mode '{0}' does not exists at {1}".format(name, os.path.exists(os.path.join(static_dir))) | |
continue | |
modes[name] = filepath | |
return modes | |
def get_theme(source_dir, static_dir): | |
""" | |
Return dict of theme files with their path relative to static directory. | |
""" | |
themes = {} | |
for item in os.listdir(os.path.join(static_dir, source_dir)): | |
name = '.'.join(os.path.splitext(item)[0:-1]) | |
filepath = os.path.join(source_dir, item) | |
themes[name] = filepath | |
return themes | |
print json.dumps(get_theme(THEMES_SOURCE_DIR, STATIC_DIR), indent=4, sort_keys=True) | |
print json.dumps(get_modes(MODES, MODES_SOURCE_DIR, STATIC_DIR), indent=4, sort_keys=True) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Extracted modes from codemirror 5.8.12 | |
""" | |
CODEMIRROR_MODES = { | |
"APL": "CodeMirror/mode/apl/apl.js", | |
"ASN.1": "CodeMirror/mode/asn.1/asn.1.js", | |
"ASP.NET": "CodeMirror/mode/asp.net/asp.net.js", | |
"Asterisk": "CodeMirror/mode/asterisk/asterisk.js", | |
"Brainfuck": "CodeMirror/mode/brainfuck/brainfuck.js", | |
"C": "CodeMirror/mode/c/c.js", | |
"C#": "CodeMirror/mode/c#/c#.js", | |
"C++": "CodeMirror/mode/c++/c++.js", | |
"CMake": "CodeMirror/mode/cmake/cmake.js", | |
"CQL": "CodeMirror/mode/cql/cql.js", | |
"CSS": "CodeMirror/mode/css/css.js", | |
"Clojure": "CodeMirror/mode/clojure/clojure.js", | |
"ClojureScript": "CodeMirror/mode/clojurescript/clojurescript.js", | |
"Closure Stylesheets (GSS)": "CodeMirror/mode/closure stylesheets (gss)/closure stylesheets (gss).js", | |
"Cobol": "CodeMirror/mode/cobol/cobol.js", | |
"CoffeeScript": "CodeMirror/mode/coffeescript/coffeescript.js", | |
"Common Lisp": "CodeMirror/mode/common lisp/common lisp.js", | |
"Crystal": "CodeMirror/mode/crystal/crystal.js", | |
"Cypher": "CodeMirror/mode/cypher/cypher.js", | |
"Cython": "CodeMirror/mode/cython/cython.js", | |
"D": "CodeMirror/mode/d/d.js", | |
"DTD": "CodeMirror/mode/dtd/dtd.js", | |
"Dart": "CodeMirror/mode/dart/dart.js", | |
"Django": "CodeMirror/mode/django/django.js", | |
"Dockerfile": "CodeMirror/mode/dockerfile/dockerfile.js", | |
"Dylan": "CodeMirror/mode/dylan/dylan.js", | |
"EBNF": "CodeMirror/mode/ebnf/ebnf.js", | |
"ECL": "CodeMirror/mode/ecl/ecl.js", | |
"Eiffel": "CodeMirror/mode/eiffel/eiffel.js", | |
"Elm": "CodeMirror/mode/elm/elm.js", | |
"Embedded Javascript": "CodeMirror/mode/embedded javascript/embedded javascript.js", | |
"Embedded Ruby": "CodeMirror/mode/embedded ruby/embedded ruby.js", | |
"Erlang": "CodeMirror/mode/erlang/erlang.js", | |
"F#": "CodeMirror/mode/f#/f#.js", | |
"FCL": "CodeMirror/mode/fcl/fcl.js", | |
"Factor": "CodeMirror/mode/factor/factor.js", | |
"Forth": "CodeMirror/mode/forth/forth.js", | |
"Fortran": "CodeMirror/mode/fortran/fortran.js", | |
"Gas": "CodeMirror/mode/gas/gas.js", | |
"Gherkin": "CodeMirror/mode/gherkin/gherkin.js", | |
"GitHub Flavored Markdown": "CodeMirror/mode/github flavored markdown/github flavored markdown.js", | |
"Go": "CodeMirror/mode/go/go.js", | |
"Groovy": "CodeMirror/mode/groovy/groovy.js", | |
"HAML": "CodeMirror/mode/haml/haml.js", | |
"HTML": "CodeMirror/mode/html/html.js", | |
"HTTP": "CodeMirror/mode/http/http.js", | |
"HXML": "CodeMirror/mode/hxml/hxml.js", | |
"Haskell": "CodeMirror/mode/haskell/haskell.js", | |
"Haskell (Literate)": "CodeMirror/mode/haskell (literate)/haskell (literate).js", | |
"Haxe": "CodeMirror/mode/haxe/haxe.js", | |
"IDL": "CodeMirror/mode/idl/idl.js", | |
"JSON": "CodeMirror/mode/json/json.js", | |
"JSON-LD": "CodeMirror/mode/json-ld/json-ld.js", | |
"JSX": "CodeMirror/mode/jsx/jsx.js", | |
"Java": "CodeMirror/mode/java/java.js", | |
"Java Server Pages": "CodeMirror/mode/java server pages/java server pages.js", | |
"JavaScript": "CodeMirror/mode/javascript/javascript.js", | |
"Jinja2": "CodeMirror/mode/jinja2/jinja2.js", | |
"Julia": "CodeMirror/mode/julia/julia.js", | |
"Kotlin": "CodeMirror/mode/kotlin/kotlin.js", | |
"LESS": "CodeMirror/mode/less/less.js", | |
"LaTeX": "CodeMirror/mode/latex/latex.js", | |
"LiveScript": "CodeMirror/mode/livescript/livescript.js", | |
"Lua": "CodeMirror/mode/lua/lua.js", | |
"MS SQL": "CodeMirror/mode/ms sql/ms sql.js", | |
"MUMPS": "CodeMirror/mode/mumps/mumps.js", | |
"MariaDB SQL": "CodeMirror/mode/mariadb sql/mariadb sql.js", | |
"Markdown": "CodeMirror/mode/markdown/markdown.js", | |
"Mathematica": "CodeMirror/mode/mathematica/mathematica.js", | |
"Modelica": "CodeMirror/mode/modelica/modelica.js", | |
"MySQL": "CodeMirror/mode/mysql/mysql.js", | |
"NSIS": "CodeMirror/mode/nsis/nsis.js", | |
"NTriples": "CodeMirror/mode/ntriples/ntriples.js", | |
"Nginx": "CodeMirror/mode/nginx/nginx.js", | |
"OCaml": "CodeMirror/mode/ocaml/ocaml.js", | |
"Objective C": "CodeMirror/mode/objective c/objective c.js", | |
"Octave": "CodeMirror/mode/octave/octave.js", | |
"Oz": "CodeMirror/mode/oz/oz.js", | |
"PEG.js": "CodeMirror/mode/peg.js/peg.js.js", | |
"PGP": "CodeMirror/mode/pgp/pgp.js", | |
"PHP": "CodeMirror/mode/php/php.js", | |
"PLSQL": "CodeMirror/mode/plsql/plsql.js", | |
"Pascal": "CodeMirror/mode/pascal/pascal.js", | |
"Perl": "CodeMirror/mode/perl/perl.js", | |
"Pig": "CodeMirror/mode/pig/pig.js", | |
"Plain Text": "CodeMirror/mode/plain text/plain text.js", | |
"PowerShell": "CodeMirror/mode/powershell/powershell.js", | |
"Properties files": "CodeMirror/mode/properties files/properties files.js", | |
"ProtoBuf": "CodeMirror/mode/protobuf/protobuf.js", | |
"Pug": "CodeMirror/mode/pug/pug.js", | |
"Puppet": "CodeMirror/mode/puppet/puppet.js", | |
"Python": "CodeMirror/mode/python/python.js", | |
"Q": "CodeMirror/mode/q/q.js", | |
"R": "CodeMirror/mode/r/r.js", | |
"RPM Changes": "CodeMirror/mode/rpm changes/rpm changes.js", | |
"RPM Spec": "CodeMirror/mode/rpm spec/rpm spec.js", | |
"Ruby": "CodeMirror/mode/ruby/ruby.js", | |
"Rust": "CodeMirror/mode/rust/rust.js", | |
"SAS": "CodeMirror/mode/sas/sas.js", | |
"SCSS": "CodeMirror/mode/scss/scss.js", | |
"SPARQL": "CodeMirror/mode/sparql/sparql.js", | |
"SQL": "CodeMirror/mode/sql/sql.js", | |
"Sass": "CodeMirror/mode/sass/sass.js", | |
"Scala": "CodeMirror/mode/scala/scala.js", | |
"Scheme": "CodeMirror/mode/scheme/scheme.js", | |
"Shell": "CodeMirror/mode/shell/shell.js", | |
"Sieve": "CodeMirror/mode/sieve/sieve.js", | |
"Slim": "CodeMirror/mode/slim/slim.js", | |
"Smalltalk": "CodeMirror/mode/smalltalk/smalltalk.js", | |
"Smarty": "CodeMirror/mode/smarty/smarty.js", | |
"Solr": "CodeMirror/mode/solr/solr.js", | |
"Soy": "CodeMirror/mode/soy/soy.js", | |
"Spreadsheet": "CodeMirror/mode/spreadsheet/spreadsheet.js", | |
"Squirrel": "CodeMirror/mode/squirrel/squirrel.js", | |
"Swift": "CodeMirror/mode/swift/swift.js", | |
"SystemVerilog": "CodeMirror/mode/systemverilog/systemverilog.js", | |
"TOML": "CodeMirror/mode/toml/toml.js", | |
"TTCN": "CodeMirror/mode/ttcn/ttcn.js", | |
"TTCN_CFG": "CodeMirror/mode/ttcn_cfg/ttcn_cfg.js", | |
"Tcl": "CodeMirror/mode/tcl/tcl.js", | |
"Textile": "CodeMirror/mode/textile/textile.js", | |
"TiddlyWiki ": "CodeMirror/mode/tiddlywiki /tiddlywiki .js", | |
"Tiki wiki": "CodeMirror/mode/tiki wiki/tiki wiki.js", | |
"Tornado": "CodeMirror/mode/tornado/tornado.js", | |
"Turtle": "CodeMirror/mode/turtle/turtle.js", | |
"Twig": "CodeMirror/mode/twig/twig.js", | |
"TypeScript": "CodeMirror/mode/typescript/typescript.js", | |
"VB.NET": "CodeMirror/mode/vb.net/vb.net.js", | |
"VBScript": "CodeMirror/mode/vbscript/vbscript.js", | |
"VHDL": "CodeMirror/mode/vhdl/vhdl.js", | |
"Velocity": "CodeMirror/mode/velocity/velocity.js", | |
"Verilog": "CodeMirror/mode/verilog/verilog.js", | |
"Web IDL": "CodeMirror/mode/web idl/web idl.js", | |
"XML": "CodeMirror/mode/xml/xml.js", | |
"XQuery": "CodeMirror/mode/xquery/xquery.js", | |
"YAML": "CodeMirror/mode/yaml/yaml.js", | |
"Yacas": "CodeMirror/mode/yacas/yacas.js", | |
"Z80": "CodeMirror/mode/z80/z80.js", | |
"diff": "CodeMirror/mode/diff/diff.js", | |
"edn": "CodeMirror/mode/edn/edn.js", | |
"mIRC": "CodeMirror/mode/mirc/mirc.js", | |
"mbox": "CodeMirror/mode/mbox/mbox.js", | |
"mscgen": "CodeMirror/mode/mscgen/mscgen.js", | |
"msgenny": "CodeMirror/mode/msgenny/msgenny.js", | |
"reStructuredText": "CodeMirror/mode/restructuredtext/restructuredtext.js", | |
"sTeX": "CodeMirror/mode/stex/stex.js", | |
"troff": "CodeMirror/mode/troff/troff.js", | |
"xu": "CodeMirror/mode/xu/xu.js" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Extracted themes from codemirror 5.8.12 | |
""" | |
CODEMIRROR_THEMES = { | |
"3024-day": "CodeMirror/theme/3024-day.css", | |
"3024-night": "CodeMirror/theme/3024-night.css", | |
"abcdef": "CodeMirror/theme/abcdef.css", | |
"ambiance": "CodeMirror/theme/ambiance.css", | |
"ambiance-mobile": "CodeMirror/theme/ambiance-mobile.css", | |
"base16-dark": "CodeMirror/theme/base16-dark.css", | |
"base16-light": "CodeMirror/theme/base16-light.css", | |
"bespin": "CodeMirror/theme/bespin.css", | |
"blackboard": "CodeMirror/theme/blackboard.css", | |
"cobalt": "CodeMirror/theme/cobalt.css", | |
"colorforth": "CodeMirror/theme/colorforth.css", | |
"dracula": "CodeMirror/theme/dracula.css", | |
"eclipse": "CodeMirror/theme/eclipse.css", | |
"elegant": "CodeMirror/theme/elegant.css", | |
"erlang-dark": "CodeMirror/theme/erlang-dark.css", | |
"hopscotch": "CodeMirror/theme/hopscotch.css", | |
"icecoder": "CodeMirror/theme/icecoder.css", | |
"isotope": "CodeMirror/theme/isotope.css", | |
"lesser-dark": "CodeMirror/theme/lesser-dark.css", | |
"liquibyte": "CodeMirror/theme/liquibyte.css", | |
"material": "CodeMirror/theme/material.css", | |
"mbo": "CodeMirror/theme/mbo.css", | |
"mdn-like": "CodeMirror/theme/mdn-like.css", | |
"midnight": "CodeMirror/theme/midnight.css", | |
"monokai": "CodeMirror/theme/monokai.css", | |
"neat": "CodeMirror/theme/neat.css", | |
"neo": "CodeMirror/theme/neo.css", | |
"night": "CodeMirror/theme/night.css", | |
"panda-syntax": "CodeMirror/theme/panda-syntax.css", | |
"paraiso-dark": "CodeMirror/theme/paraiso-dark.css", | |
"paraiso-light": "CodeMirror/theme/paraiso-light.css", | |
"pastel-on-dark": "CodeMirror/theme/pastel-on-dark.css", | |
"railscasts": "CodeMirror/theme/railscasts.css", | |
"rubyblue": "CodeMirror/theme/rubyblue.css", | |
"seti": "CodeMirror/theme/seti.css", | |
"solarized": "CodeMirror/theme/solarized.css", | |
"the-matrix": "CodeMirror/theme/the-matrix.css", | |
"tomorrow-night-bright": "CodeMirror/theme/tomorrow-night-bright.css", | |
"tomorrow-night-eighties": "CodeMirror/theme/tomorrow-night-eighties.css", | |
"ttcn": "CodeMirror/theme/ttcn.css", | |
"twilight": "CodeMirror/theme/twilight.css", | |
"vibrant-ink": "CodeMirror/theme/vibrant-ink.css", | |
"xq-dark": "CodeMirror/theme/xq-dark.css", | |
"xq-light": "CodeMirror/theme/xq-light.css", | |
"yeti": "CodeMirror/theme/yeti.css", | |
"zenburn": "CodeMirror/theme/zenburn.css" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment