improve the codemirror mode - show errors and warnings