I saw this post: The ability to hide the folder with attachments - #2 by cmjn
And tried it, but it wasn’t working. The problem was just that I use an attachments folder inside of each sub-folder.
This does the trick:
div[data-path$='attachments'],
div[data-path$='attachments'] + div.nav-folder-children ,
div[data-path$='/attachments'] + div.nav-folder-children
{
display: none;
}