Atom claims to have code folding, but (despite having syntax highlighting) the code folding function works naively off of indents, not syntax, so you're out of luck working on any codebase with less-than-meticulous indentation, zero-indent comments, etc.
Unfortunately, IIRC, Sublime does exactly the same thing. It's really frustrating. I haven't been able to find a good all-purpose Mac programmer's editor with working code folding.
Atom is currently in the process of working on implementing a new source folding parser [0] based on something called 'tree-sitter' [1]. If you are interested in following that development, feel free to watch that PR.
Unfortunately, IIRC, Sublime does exactly the same thing. It's really frustrating. I haven't been able to find a good all-purpose Mac programmer's editor with working code folding.