I'm on spacemacs develop, emacs version 27, OSX Mojave 10.14.
After adding the lsp
layer and the snippet from the metals documentation here: to my .spacemacs file, treemacs will refuse to expand a directory and display its contents, giving the error "Creating pipe: too many open files"
My ulimit setting are:
$ ulimit -a
-t: cpu time (seconds) unlimited
-f: file size (blocks) unlimited
-d: data seg size (kbytes) unlimited
-s: stack size (kbytes) 8192
-c: core file size (blocks) 0
-v: address space (kbytes) unlimited
-l: locked-in-memory size (kbytes) unlimited
-u: processes 1418
-n: file descriptors 256
I suspect this is related to either metals or lsp-mode creating some large number of files in the compilation process. Though checking lsof:
$ lsof | grep -iE "sbt|ivy2" | wc -l
1585
doesn't show too many open files related to sbt or ivy.
Running list-buffers
I show only 10-20 buffers; nothing unusual.
When this happens, I cannot even exit Emacs and have to kill -9 the process.