This repository was archived by the owner on Aug 23, 2020. It is now read-only.

Description
As the language modes page shows, for the C++ language CodeMirror only has a C-like mode, and it seems that to make a proper configuration for C++, we have to
- set the name of the mode to 'clike' to load the appropriate mode file (
clike.js in this case), and
- set the MIME type to
text/x-c++src, as suggested at the bottom of this page, since the clike mode is not C++-specific.
And how can I achieve that without hard-coding something into the template file?
For reference, the CodeMirror manual says
mode: string|object
The mode to use. It may be a string, which either simply names the mode or is a MIME type associated with the mode. Alternatively, it may be an object containing configuration options for the mode, with a name property that names the mode (for example {name: "javascript", json: true})