Use CodeMirror meta.js to describe modes

Instead of writing out the mode_map table by hand, compile and include
meta.js from the CodeMirror distribution.  This script lists all modes
in simple JavaScript objects.

An advantage of this format is the name property is human readable,
and does not require munging MIME type strings.  Adding new modes now
changes only 2 files in the client (Modes and ModeInfo).

Change-Id: Ifa0c7af77681f72b8210fca83a7af6a9ef1c6541
This commit is contained in:
Shawn Pearce
2014-12-30 23:41:57 -05:00
parent 8deb1b43d4
commit 60a77b0562
10 changed files with 314 additions and 412 deletions

View File

@@ -15,6 +15,7 @@ CM_THEMES = [
CM_JS = [
'lib/codemirror.js',
'mode/meta.js',
'keymap/vim.js',
'addon/dialog/dialog.js',
'addon/scroll/simplescrollbars.js',