I've found that the formatting pasted into Evernote (with or without code block) depends on the application that generated the format. So far, IntelliJ gives me the best formatting because it keeps both, the font colors and indentation. From VS Code I lose indentation and from Atom or TextMate I lose color. See the screenshot attached.