I'm not familiar with other ways that may exist to configure CodeMirror, but I have a plugin - Space Indenter - that exposes relevant CodeMirror settings to the user. At the moment it allows one to switch to indentation with spaces and to define the default indentation size. I can add smartIndent
support in the next version as it seems associated with the plugin's main objective.